From: Kent Overstreet Date: Sat, 19 Apr 2025 06:50:29 +0000 (-0400) Subject: bcachefs: Fix ref leak in write_super() X-Git-Tag: v6.15-rc4~27^2~17 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=bfbb76ec9808ce80e661dae77018b77488bb56d0;p=linux-block.git bcachefs: Fix ref leak in write_super() found with the new enumerated_ref code Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index 25b6bce05c3c..cb5d960aed92 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -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) {