From bcedfe175296970dae4f1ccc104c91b364c9e807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20A=2E=20Fern=C3=A1ndez?= Date: Sun, 7 Jan 2024 19:10:40 -0300 Subject: [PATCH] Read error before setting error pointer to null MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I'm in a rush to get the tag out today and I'm making a mess. The previous patch set an error pointer to null in apfs_node_split(), but I didn't notice that the actual error would get read later. Reorder this. I usually would just squash this into the previous patch, but in my rush I have already pushed it. Signed-off-by: Ernesto A. Fernández --- node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node.c b/node.c index 1bb3d77..b7893e0 100644 --- a/node.c +++ b/node.c @@ -1266,9 +1266,9 @@ int apfs_node_split(struct apfs_query *query) new_node = apfs_create_node(sb, storage); if (IS_ERR(new_node)) { - new_node = NULL; apfs_err(sb, "node creation failed"); err = PTR_ERR(new_node); + new_node = NULL; goto out; } new_node->tree_type = old_node->tree_type;