Skip to content

Commit c02b943

Browse files
author
Kent Overstreet
committed
bcachefs: Fix reference to invalid bucket in copygc
Use bch2_dev_bucket_tryget() instead of bch2_dev_tryget() before checking the bucket bitmap. Reported-by: syzbot+3168625f36f4a539237e@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 9fe8ec8 commit c02b943

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/bcachefs/movinggc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static int bch2_bucket_is_movable(struct btree_trans *trans,
7171
if (ret)
7272
return ret;
7373

74-
struct bch_dev *ca = bch2_dev_tryget(c, k.k->p.inode);
74+
struct bch_dev *ca = bch2_dev_bucket_tryget(c, k.k->p);
7575
if (!ca)
7676
goto out;
7777

0 commit comments

Comments
 (0)