bcachefs: Fix an endianness conversion
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 11 Nov 2023 21:31:20 +0000 (16:31 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 24 Nov 2023 07:42:07 +0000 (02:42 -0500)
cpu_to_le32(), not le32_to_cpu() - fixes a sparse complaint.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/snapshot.c

index e9af77b384c76c694194c53b348706e354df9a22..5dac038f085195c894ace91df6d43ad296cdbd5c 100644 (file)
@@ -959,7 +959,7 @@ static int bch2_snapshot_node_delete(struct btree_trans *trans, u32 id)
                                        parent_id, id))
                        goto err;
 
-               parent->v.children[i] = le32_to_cpu(child_id);
+               parent->v.children[i] = cpu_to_le32(child_id);
 
                normalize_snapshot_child_pointers(&parent->v);
        }