Commit ad3d81ba authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Chris Mason

Btrfs: missing endianess conversion in insert_new_root

Add two missing endianess conversions in this function, found by sparse.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 50ec891c
...@@ -1656,8 +1656,8 @@ static int noinline insert_new_root(struct btrfs_trans_handle *trans, ...@@ -1656,8 +1656,8 @@ static int noinline insert_new_root(struct btrfs_trans_handle *trans,
c = btrfs_alloc_free_block(trans, root, root->nodesize, c = btrfs_alloc_free_block(trans, root, root->nodesize,
root->root_key.objectid, root->root_key.objectid,
root_gen, lower_key.objectid, level, root_gen, le64_to_cpu(lower_key.objectid),
root->node->start, 0); level, root->node->start, 0);
if (IS_ERR(c)) if (IS_ERR(c))
return PTR_ERR(c); return PTR_ERR(c);
...@@ -2352,8 +2352,9 @@ static noinline int split_leaf(struct btrfs_trans_handle *trans, ...@@ -2352,8 +2352,9 @@ static noinline int split_leaf(struct btrfs_trans_handle *trans,
right = btrfs_alloc_free_block(trans, root, root->leafsize, right = btrfs_alloc_free_block(trans, root, root->leafsize,
root->root_key.objectid, root->root_key.objectid,
root_gen, disk_key.objectid, 0, root_gen,
l->start, 0); le64_to_cpu(disk_key.objectid),
0, l->start, 0);
if (IS_ERR(right)) { if (IS_ERR(right)) {
BUG_ON(1); BUG_ON(1);
return PTR_ERR(right); return PTR_ERR(right);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment