Skip to content

Commit bfbb76e

Browse files
author
Kent Overstreet
committed
bcachefs: Fix ref leak in write_super()
found with the new enumerated_ref code Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 4c327d0 commit bfbb76e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fs/bcachefs/super-io.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,8 @@ int bch2_write_super(struct bch_fs *c)
11021102
prt_str(&buf, ")");
11031103
bch2_fs_fatal_error(c, ": %s", buf.buf);
11041104
printbuf_exit(&buf);
1105-
return -BCH_ERR_sb_not_downgraded;
1105+
ret = -BCH_ERR_sb_not_downgraded;
1106+
goto out;
11061107
}
11071108

11081109
darray_for_each(online_devices, ca) {

0 commit comments

Comments
 (0)