[PATCH 05/10] don't use spin_lock_irqsave() unnecessarily

From: Kent Overstreet
Date: Fri May 18 2018 - 02:57:31 EST


Signed-off-by: Kent Overstreet <kent.overstreet@xxxxxxxxx>
---
mm/page-writeback.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 586f31261c..17ccc294c9 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2460,20 +2460,19 @@ int __set_page_dirty_nobuffers(struct page *page)
lock_page_memcg(page);
if (!TestSetPageDirty(page)) {
struct address_space *mapping = page_mapping(page);
- unsigned long flags;

if (!mapping) {
unlock_page_memcg(page);
return 1;
}

- spin_lock_irqsave(&mapping->tree_lock, flags);
+ spin_lock_irq(&mapping->tree_lock);
BUG_ON(page_mapping(page) != mapping);
WARN_ON_ONCE(!PagePrivate(page) && !PageUptodate(page));
account_page_dirtied(page, mapping);
radix_tree_tag_set(&mapping->page_tree, page_index(page),
PAGECACHE_TAG_DIRTY);
- spin_unlock_irqrestore(&mapping->tree_lock, flags);
+ spin_unlock_irq(&mapping->tree_lock);
unlock_page_memcg(page);

if (mapping->host) {
--
2.17.0