summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-04-19 02:50:29 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-04-20 19:41:38 -0400
commitbfbb76ec9808ce80e661dae77018b77488bb56d0 (patch)
tree226475cbee25b090489df352641493be79f305c4
parent4c327d03d7c9d5e815a2aada112c442e4a2f8665 (diff)
bcachefs: Fix ref leak in write_super()
found with the new enumerated_ref code Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/super-io.c3
1 files changed, 2 insertions, 1 deletions
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) {