diff mbox series

[08/10] btrfs: remove irq disabling for fs_info.ebleak_lock

Message ID 20230314165910.373347-9-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/10] btrfs: use a plain workqueue for ordered_extent processing | expand

Commit Message

Christoph Hellwig March 14, 2023, 4:59 p.m. UTC
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(-)

Comments

Johannes Thumshirn March 17, 2023, 10:35 a.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
diff mbox series

Patch

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index b0f74c741aa7a9..8e1ad6d1c7ccca 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -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)