Add API for nested write locks and convert the few call sites doing that.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -11,6 +11,11 @@ static inline void mmap_write_lock(struct mm_struct *mm) · 10 unmodified lines | ||
| 11 | 11 | down_write(&mm->mmap_sem); |
| 12 | 12 | } |
| 13 | 13 | |
| 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 | + | |
| 14 | 19 | static inline int mmap_write_lock_killable(struct mm_struct *mm) |
| 15 | 20 | { |
| 16 | 21 | return down_write_killable(&mm->mmap_sem); |