diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index bd0ae3ec76ff..783ea3bac7dc 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -2792,8 +2792,6 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root if (!should_cow_block(trans, root, b)) goto cow_done; - btrfs_set_path_blocking(p); - /* * must have write locks on this node and the * parent @@ -2807,6 +2805,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root goto again; } + btrfs_set_path_blocking(p); err = btrfs_cow_block(trans, root, b, p->nodes[level + 1], p->slots[level + 1], &b);