linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dax: Release PMD lock even when there is no PMD support in DAX
@ 2018-01-18 13:38 Jan H. Schönherr
  2018-01-18 14:07 ` Matthew Wilcox
  2018-01-18 16:20 ` Ross Zwisler
  0 siblings, 2 replies; 9+ messages in thread
From: Jan H. Schönherr @ 2018-01-18 13:38 UTC (permalink / raw)
  To: Matthew Wilcox, Ross Zwisler; +Cc: Jan H. Schönherr, linux-fsdevel

The function follow_pte_pmd() can theoretically return after having
acquired a PMD lock, even when DAX was not compiled with
CONFIG_FS_DAX_PMD.

Release the PMD lock unconditionally.

Fixes: f729c8c9b24f ("dax: wrprotect pmd_t in dax_mapping_entry_mkclean")
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
---
 fs/dax.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/dax.c b/fs/dax.c
index 9598159..c2ebf10 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -636,8 +636,8 @@ static void dax_mapping_entry_mkclean(struct address_space *mapping,
 			pmd = pmd_mkclean(pmd);
 			set_pmd_at(vma->vm_mm, address, pmdp, pmd);
 unlock_pmd:
-			spin_unlock(ptl);
 #endif
+			spin_unlock(ptl);
 		} else {
 			if (pfn != pte_pfn(*ptep))
 				goto unlock_pte;
-- 
2.9.3.1.gcba166c.dirty

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-25 21:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 13:38 [PATCH] dax: Release PMD lock even when there is no PMD support in DAX Jan H. Schönherr
2018-01-18 14:07 ` Matthew Wilcox
2018-01-18 14:22   ` Matthew Wilcox
2018-01-18 14:27     ` Jan H. Schönherr
2018-01-18 14:35       ` Jan H. Schönherr
2018-01-18 14:22   ` Jan H. Schönherr
2018-01-18 16:20 ` Ross Zwisler
2018-01-25 16:34   ` Ross Zwisler
2018-01-25 21:29     ` Jan H. Schönherr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).