Skip to content

Commit

Permalink
Read error before setting error pointer to null
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
eafer committed Jan 7, 2024
1 parent 8b2287d commit bcedfe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bcedfe1

Please sign in to comment.