aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 8d7a152a90c6..41cf1b451b41 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2786,15 +2786,15 @@ int try_release_extent_mapping(struct extent_map_tree *map,
2786 u64 len; 2786 u64 len;
2787 while (start <= end) { 2787 while (start <= end) {
2788 len = end - start + 1; 2788 len = end - start + 1;
2789 spin_lock(&map->lock); 2789 write_lock(&map->lock);
2790 em = lookup_extent_mapping(map, start, len); 2790 em = lookup_extent_mapping(map, start, len);
2791 if (!em || IS_ERR(em)) { 2791 if (!em || IS_ERR(em)) {
2792 spin_unlock(&map->lock); 2792 write_unlock(&map->lock);
2793 break; 2793 break;
2794 } 2794 }
2795 if (test_bit(EXTENT_FLAG_PINNED, &em->flags) || 2795 if (test_bit(EXTENT_FLAG_PINNED, &em->flags) ||
2796 em->start != start) { 2796 em->start != start) {
2797 spin_unlock(&map->lock); 2797 write_unlock(&map->lock);
2798 free_extent_map(em); 2798 free_extent_map(em);
2799 break; 2799 break;
2800 } 2800 }
@@ -2808,7 +2808,7 @@ int try_release_extent_mapping(struct extent_map_tree *map,
2808 free_extent_map(em); 2808 free_extent_map(em);
2809 } 2809 }
2810 start = extent_map_end(em); 2810 start = extent_map_end(em);
2811 spin_unlock(&map->lock); 2811 write_unlock(&map->lock);
2812 2812
2813 /* once for us */ 2813 /* once for us */
2814 free_extent_map(em); 2814 free_extent_map(em);