diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2015-04-22 13:47:35 -0700 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-05-06 17:14:14 -0400 |
commit | 1d2eda208020a1372d5c715eee1f0555bd6b0a04 (patch) | |
tree | db3eeb35682012a1631a2270289a40a420af66fe | |
parent | 1706d4d4e770c6ec8eeec051d201995fbc228264 (diff) |
don't use spin_lock_irqsave() unnecessarily
We must be in process context here, else the code would be incorrect -
__mark_inode_dirty uses normal spin_lock
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | mm/page-writeback.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 078f1461e074..3429b794bcad 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2464,20 +2464,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; } - xa_lock_irqsave(&mapping->i_pages, flags); + xa_lock_irq(&mapping->i_pages); BUG_ON(page_mapping(page) != mapping); WARN_ON_ONCE(!PagePrivate(page) && !PageUptodate(page)); account_page_dirtied(page, mapping); radix_tree_tag_set(&mapping->i_pages, page_index(page), PAGECACHE_TAG_DIRTY); - xa_unlock_irqrestore(&mapping->i_pages, flags); + xa_unlock_irq(&mapping->i_pages); unlock_page_memcg(page); if (mapping->host) { |