Skip to content

Commit ee190ca

Browse files
schnhrrtorvalds
authored andcommitted
fs/dax.c: release PMD lock even when there is no PMD support in DAX
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. Link: http://lkml.kernel.org/r/20180118133839.20587-1-jschoenh@amazon.de Fixes: f729c8c ("dax: wrprotect pmd_t in dax_mapping_entry_mkclean") Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 7b1cd95 commit ee190ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/dax.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,8 @@ static void dax_mapping_entry_mkclean(struct address_space *mapping,
636636
pmd = pmd_mkclean(pmd);
637637
set_pmd_at(vma->vm_mm, address, pmdp, pmd);
638638
unlock_pmd:
639-
spin_unlock(ptl);
640639
#endif
640+
spin_unlock(ptl);
641641
} else {
642642
if (pfn != pte_pfn(*ptep))
643643
goto unlock_pte;

0 commit comments

Comments
 (0)