summaryrefslogtreecommitdiff
path: root/fs/bcachefs/subvolume.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-01-09 03:07:32 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:22 +0300
commitc4ecf802fbfae032730caf40fd74fb27c057a916 (patch)
treea6802081ed01cdcb0467dcc94cac085dd2e049c6 /fs/bcachefs/subvolume.c
parentb674bfadd86aa7f815156f15cc01af95440380f9 (diff)
downloadlinux-c4ecf802fbfae032730caf40fd74fb27c057a916.tar.xz
bcachefs: Fix an error path in bch2_snapshot_node_create()
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/subvolume.c')
-rw-r--r--fs/bcachefs/subvolume.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/subvolume.c b/fs/bcachefs/subvolume.c
index 8aeb2e417a15..012d8e8c52c4 100644
--- a/fs/bcachefs/subvolume.c
+++ b/fs/bcachefs/subvolume.c
@@ -522,7 +522,7 @@ static int bch2_snapshot_node_create(struct btree_trans *trans, u32 parent,
n = bch2_trans_kmalloc(trans, sizeof(*n));
ret = PTR_ERR_OR_ZERO(n);
if (ret)
- return ret;
+ goto err;
bkey_reassemble(&n->k_i, k);