Btrfs: insert_new_root: Fix lock type of the extent buffer.
PATCH 1/1 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 Chandan Rajendra <[email protected]>
--- fs/btrfs/ctree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/ctree.c +1 -1
@@ -3383,7 +3383,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,add_root_to_dirty_list (root);extent_buffer_get (c); path->nodes[level] = c; - path->locks[level] =BTRFS_WRITE_LOCK ; + path->locks[level] =BTRFS_WRITE_LOCK_BLOCKING ; path->slots[level] =0 ;return 0 ; }
Signature · 1 line
2.1.0