Skip to content

Commit 710b512

Browse files
schnhrrgregkh
authored andcommitted
fs/dax.c: release PMD lock even when there is no PMD support in DAX
[ Upstream commit ee190ca ] 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/[email protected] Fixes: f729c8c ("dax: wrprotect pmd_t in dax_mapping_entry_mkclean") Signed-off-by: Jan H. Schönherr <[email protected]> Reviewed-by: Ross Zwisler <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent cc0600d commit 710b512

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/dax.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ static void dax_mapping_entry_mkclean(struct address_space *mapping,
630630
set_pmd_at(vma->vm_mm, address, pmdp, pmd);
631631
mmu_notifier_invalidate_range(vma->vm_mm, start, end);
632632
unlock_pmd:
633-
spin_unlock(ptl);
634633
#endif
634+
spin_unlock(ptl);
635635
} else {
636636
if (pfn != pte_pfn(*ptep))
637637
goto unlock_pte;

0 commit comments

Comments
 (0)