Commit 95449a16 authored by chandan's avatar chandan Committed by Chris Mason

Btrfs: insert_new_root: Fix lock type of the extent buffer.

btrfs_alloc_tree_block() returns an extent buffer on which a blocked lock has
been taken. Hence assign the appropriate value to path->locks[level].
Signed-off-by: default avatarChandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 78f55e5e
...@@ -3380,7 +3380,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans, ...@@ -3380,7 +3380,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,
add_root_to_dirty_list(root); add_root_to_dirty_list(root);
extent_buffer_get(c); extent_buffer_get(c);
path->nodes[level] = c; path->nodes[level] = c;
path->locks[level] = BTRFS_WRITE_LOCK; path->locks[level] = BTRFS_WRITE_LOCK_BLOCKING;
path->slots[level] = 0; path->slots[level] = 0;
return 0; return 0;
} }
......
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