1

bcachefs: Fix ref in trans_mark_dev_sbs() error path

Reported-by: syzbot+5c7f715a7107a608a544@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2024-05-19 17:07:32 -04:00
parent 54429c902a
commit 9667214b30

View File

@ -1465,7 +1465,7 @@ int bch2_trans_mark_dev_sbs_flags(struct bch_fs *c,
for_each_online_member(c, ca) { for_each_online_member(c, ca) {
int ret = bch2_trans_mark_dev_sb(c, ca, flags); int ret = bch2_trans_mark_dev_sb(c, ca, flags);
if (ret) { if (ret) {
bch2_dev_put(ca); percpu_ref_put(&ca->io_ref);
return ret; return ret;
} }
} }