@@ -44,27 +44,24 @@ static struct kmem_cache *extent_buffer_cache;
static inline void btrfs_leak_debug_add_eb(struct extent_buffer *eb)
{
struct btrfs_fs_info *fs_info = eb->fs_info;
- unsigned long flags;
- spin_lock_irqsave(&fs_info->eb_leak_lock, flags);
+ spin_lock(&fs_info->eb_leak_lock);
list_add(&eb->leak_list, &fs_info->allocated_ebs);
- spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags);
+ spin_unlock(&fs_info->eb_leak_lock);
}
static inline void btrfs_leak_debug_del_eb(struct extent_buffer *eb)
{
struct btrfs_fs_info *fs_info = eb->fs_info;
- unsigned long flags;
- spin_lock_irqsave(&fs_info->eb_leak_lock, flags);
+ spin_lock(&fs_info->eb_leak_lock);
list_del(&eb->leak_list);
- spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags);
+ spin_unlock(&fs_info->eb_leak_lock);
}
void btrfs_extent_buffer_leak_debug_check(struct btrfs_fs_info *fs_info)
{
struct extent_buffer *eb;
- unsigned long flags;
/*
* If we didn't get into open_ctree our allocated_ebs will not be
@@ -74,7 +71,7 @@ void btrfs_extent_buffer_leak_debug_check(struct btrfs_fs_info *fs_info)
return;
WARN_ON(!list_empty(&fs_info->allocated_ebs));
- spin_lock_irqsave(&fs_info->eb_leak_lock, flags);
+ spin_lock(&fs_info->eb_leak_lock);
while (!list_empty(&fs_info->allocated_ebs)) {
eb = list_first_entry(&fs_info->allocated_ebs,
struct extent_buffer, leak_list);
@@ -85,7 +82,7 @@ void btrfs_extent_buffer_leak_debug_check(struct btrfs_fs_info *fs_info)
list_del(&eb->leak_list);
kmem_cache_free(extent_buffer_cache, eb);
}
- spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags);
+ spin_unlock(&fs_info->eb_leak_lock);
}
#else
#define btrfs_leak_debug_add_eb(eb) do {} while (0)
None of the extent_buffer leak tracking is called from irq context, so remove the irq disabling. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/btrfs/extent_io.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)