+ page-cache-use-xa_lock-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: page-cache-use-xa_lock-fix
has been added to the -mm tree.  Its filename is
     page-cache-use-xa_lock-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/page-cache-use-xa_lock-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/page-cache-use-xa_lock-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Subject: page-cache-use-xa_lock-fix

fix nds32, fs/dax.c

Link: http://lkml.kernel.org/r/20180406145415.GB20605@xxxxxxxxxxxxxxxxxxxxxx

Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/nds32/include/asm/cacheflush.h |    4 ++--
 fs/dax.c                            |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff -puN arch/nds32/include/asm/cacheflush.h~page-cache-use-xa_lock-fix arch/nds32/include/asm/cacheflush.h
--- a/arch/nds32/include/asm/cacheflush.h~page-cache-use-xa_lock-fix
+++ a/arch/nds32/include/asm/cacheflush.h
@@ -34,8 +34,8 @@ void flush_anon_page(struct vm_area_stru
 void flush_kernel_dcache_page(struct page *page);
 void flush_icache_range(unsigned long start, unsigned long end);
 void flush_icache_page(struct vm_area_struct *vma, struct page *page);
-#define flush_dcache_mmap_lock(mapping)   spin_lock_irq(&(mapping)->tree_lock)
-#define flush_dcache_mmap_unlock(mapping) spin_unlock_irq(&(mapping)->tree_lock)
+#define flush_dcache_mmap_lock(mapping)   xa_lock_irq(&(mapping)->i_pages)
+#define flush_dcache_mmap_unlock(mapping) xa_unlock_irq(&(mapping)->i_pages)
 
 #else
 #include <asm-generic/cacheflush.h>
diff -puN fs/dax.c~page-cache-use-xa_lock-fix fs/dax.c
--- a/fs/dax.c~page-cache-use-xa_lock-fix
+++ a/fs/dax.c
@@ -499,7 +499,7 @@ static int __dax_invalidate_mapping_entr
 	void *entry;
 	struct radix_tree_root *pages = &mapping->i_pages;
 
-	xa_lock_irq(&mapping->i_pages);
+	xa_lock_irq(pages);
 	entry = get_unlocked_mapping_entry(mapping, index, NULL);
 	if (!entry || WARN_ON_ONCE(!radix_tree_exceptional_entry(entry)))
 		goto out;
@@ -513,7 +513,7 @@ static int __dax_invalidate_mapping_entr
 	ret = 1;
 out:
 	put_unlocked_mapping_entry(mapping, index, entry);
-	xa_unlock_irq(&mapping->i_pages);
+	xa_unlock_irq(pages);
 	return ret;
 }
 /*
@@ -600,7 +600,7 @@ static void *dax_insert_mapping_entry(st
 			unmap_mapping_pages(mapping, vmf->pgoff, 1, false);
 	}
 
-	xa_lock_irq(&mapping->i_pages);
+	xa_lock_irq(pages);
 	new_entry = dax_radix_locked_entry(pfn, flags);
 	if (dax_entry_size(entry) != dax_entry_size(new_entry)) {
 		dax_disassociate_entry(entry, mapping, false);
_

Patches currently in -mm which might be from willy@xxxxxxxxxxxxx are

page-cache-use-xa_lock-fix.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux