fs/dax.c: release PMD lock even when there is no PMD support in DAX
Subsystems (2)
PATCH 1/119 fs/dax.c: release PMD lock even when there is no PMD support in DAX
From: Jan H. Schönherr <[email protected]>
Subject: 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 f729c8c9b24f ("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]>
---
fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/dax.c renamed from fs/dax.c~dax-release-pmd-lock-even-when-there-is-no-pmd-support-in-dax +1 -1
@@ -636,8 +636,8 @@ static void dax_mapping_entry_mkclean(st 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;
_