From: Michel Lespinasse Date: Tue, 9 Jun 2020 04:33:18 +0000 (-0700) Subject: MMU notifier: use the new mmap locking API X-Git-Tag: v5.15~3641^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b72327fc8dfc1babce18526239b08724b95ef5f0;p=platform%2Fkernel%2Flinux-starfive.git MMU notifier: use the new mmap locking API This use is converted manually ahead of the next patch in the series, as it requires including a new header which the automated conversion would miss. Signed-off-by: Michel Lespinasse Signed-off-by: Andrew Morton Reviewed-by: Daniel Jordan Reviewed-by: Davidlohr Bueso Reviewed-by: Laurent Dufour Reviewed-by: Vlastimil Babka Cc: David Rientjes Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: John Hubbard Cc: Liam Howlett Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Ying Han Link: http://lkml.kernel.org/r/20200520052908.204642-3-walken@google.com Signed-off-by: Linus Torvalds --- diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index 736f691..2f46271 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -277,9 +278,9 @@ mmu_notifier_get(const struct mmu_notifier_ops *ops, struct mm_struct *mm) { struct mmu_notifier *ret; - down_write(&mm->mmap_sem); + mmap_write_lock(mm); ret = mmu_notifier_get_locked(ops, mm); - up_write(&mm->mmap_sem); + mmap_write_unlock(mm); return ret; } void mmu_notifier_put(struct mmu_notifier *subscription);