From: Kent Overstreet Date: Sun, 9 Jan 2022 00:07:32 +0000 (-0500) Subject: bcachefs: Fix an error path in bch2_snapshot_node_create() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c4ecf802fbfae032730caf40fd74fb27c057a916;p=linux.git bcachefs: Fix an error path in bch2_snapshot_node_create() Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/subvolume.c b/fs/bcachefs/subvolume.c index 8aeb2e417a157..012d8e8c52c4b 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);