]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bcachefs: Fix incorrect transaction restart handling
authorAlan Huang <mmpgouride@gmail.com>
Mon, 30 Jun 2025 12:36:33 +0000 (20:36 +0800)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 30 Jun 2025 21:28:55 +0000 (17:28 -0400)
Reported-by: syzbot+cc7567f096079cb4146f@syzkaller.appspotmail.com
Signed-off-by: Alan Huang <mmpgouride@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fsck.c

index 9920f1affc5ba2b38166544138fa3e6508d77f80..63093def85e35ea617ae68869c3dcbe744b8c315 100644 (file)
@@ -2819,7 +2819,7 @@ static int check_path_loop(struct btree_trans *trans, struct bkey_s_c inode_k)
                                ret = remove_backpointer(trans, &inode);
                                bch_err_msg(c, ret, "removing dirent");
                                if (ret)
-                                       break;
+                                       goto out;
 
                                ret = reattach_inode(trans, &inode);
                                bch_err_msg(c, ret, "reattaching inode %llu", inode.bi_inum);