@@ -5720,7 +5720,6 @@ again:
dedup_hash = 0;
path->reada = 1;
- path->leave_spinning = 1;
is_data = owner_objectid >= BTRFS_FIRST_FREE_OBJECTID;
BUG_ON(!is_data && refs_to_drop != 1);
@@ -5774,7 +5773,6 @@ again:
goto out;
}
btrfs_release_path(path);
- path->leave_spinning = 1;
key.objectid = bytenr;
key.type = BTRFS_EXTENT_ITEM_KEY;
@@ -5942,6 +5940,7 @@ again:
dedup_hash = extent_data_ref_offset(root,
path, iref);
+ WARN_ON_ONCE(path->leave_spinning);
ret = btrfs_free_dedup_extent(trans, root,
dedup_hash, bytenr);
if (ret) {
Checking for dedup references needs to allocate memory so it cannot be run within spin_lock, otherwise it will end up with heavy deadlock. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> --- fs/btrfs/extent-tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)