VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   57 Tags
author: Mike Kravetz <mike.kravetz@oracle.com> 2020-04-01 21:11:05 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2020-04-02 09:35:32 -0700 commit: c0d0381ade79885c04a04c303284b040616b116e parent: 49aef7175cc6eb703a9280a7b830e675fe8f2704
Commit Summary:
hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index aff8642f0c2e..ce9d354ea5c2 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -450,7 +450,9 @@ static void remove_inode_hugepages(struct inode *inode, loff_t lstart,
 			if (unlikely(page_mapped(page))) {
 				BUG_ON(truncate_op);
 
+				mutex_unlock(&hugetlb_fault_mutex_table[hash]);
 				i_mmap_lock_write(mapping);
+				mutex_lock(&hugetlb_fault_mutex_table[hash]);
 				hugetlb_vmdelete_list(&mapping->i_mmap,
 					index * pages_per_huge_page(h),
 					(index + 1) * pages_per_huge_page(h));