History

mmap locking API: convert nested write lock sites

Add API for nested write locks and convert the few call sites doing that.

Michel Lespinasse committed 6 years ago

Commit aaa2cc51 parent 89154dd3 files · +8 −2Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/mmap_lock.h+5−0
@@ -11,6 +11,11 @@ static inline void mmap_write_lock(struct mm_struct *mm) · 10 unmodified lines
1111 down_write(&mm->mmap_sem);
1212 }
1313
14+static inline void mmap_write_lock_nested(struct mm_struct *mm, int subclass)
15+{
16+ down_write_nested(&mm->mmap_sem, subclass);
17+}
18+
1419 static inline int mmap_write_lock_killable(struct mm_struct *mm)
1520 {
1621 return down_write_killable(&mm->mmap_sem);