Commit ee190ca6 authored by Jan H. Schönherr's avatar Jan H. Schönherr Committed by Linus Torvalds

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.

Fixes: f729c8c9 ("dax: wrprotect pmd_t in dax_mapping_entry_mkclean")
Signed-off-by: default avatarJan H. Schönherr <>
Reviewed-by: default avatarRoss Zwisler <>
Reviewed-by: default avatarAndrew Morton <>
Cc: Matthew Wilcox <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 7b1cd95d
......@@ -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);
} else {
if (pfn != pte_pfn(*ptep))
goto unlock_pte;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment