bcachefs: Fix ref leak in write_super()

found with the new enumerated_ref code

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet
2025-04-19 02:50:29 -04:00
parent 4c327d03d7
commit bfbb76ec98

View File

@@ -1102,7 +1102,8 @@ int bch2_write_super(struct bch_fs *c)
prt_str(&buf, ")");
bch2_fs_fatal_error(c, ": %s", buf.buf);
printbuf_exit(&buf);
return -BCH_ERR_sb_not_downgraded;
ret = -BCH_ERR_sb_not_downgraded;
goto out;
}
darray_for_each(online_devices, ca) {