[PATCH v1] fs:bcachefs:fsck:Fix double assignment in check_dirent_to_subvol()

Yuesong Li posted 1 patch 1 year, 5 months ago
fs/bcachefs/fsck.c | 1 -
1 file changed, 1 deletion(-)
[PATCH v1] fs:bcachefs:fsck:Fix double assignment in check_dirent_to_subvol()
Posted by Yuesong Li 1 year, 5 months ago
ret was assigned twice in check_dirent_to_subvol(). Reported by cocci.

Signed-off-by: Yuesong Li <liyuesong@vivo.com>
---
 fs/bcachefs/fsck.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index 9138944c5ae6..411a9795cc03 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -2006,7 +2006,6 @@ static int check_dirent_to_subvol(struct btree_trans *trans, struct btree_iter *
 	if (ret) {
 		bch_err(c, "subvol %u points to missing inode root %llu", target_subvol, target_inum);
 		ret = -BCH_ERR_fsck_repair_unimplemented;
-		ret = 0;
 		goto err;
 	}
 
-- 
2.34.1
Re: [PATCH v1] fs:bcachefs:fsck:Fix double assignment in check_dirent_to_subvol()
Posted by Kent Overstreet 1 year, 5 months ago
On Thu, Aug 22, 2024 at 02:21:58PM GMT, Yuesong Li wrote:
> ret was assigned twice in check_dirent_to_subvol(). Reported by cocci.
> 
> Signed-off-by: Yuesong Li <liyuesong@vivo.com>

Thanks, applied