From c4ecf802fbfae032730caf40fd74fb27c057a916 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 8 Jan 2022 19:07:32 -0500 Subject: [PATCH] bcachefs: Fix an error path in bch2_snapshot_node_create() Signed-off-by: Kent Overstreet --- fs/bcachefs/subvolume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.25.1