Add API for nested write locks and convert the few call sites doing that.
Showing the changes to kernel (1 of 3 files). Show all
Unified · Split
| @@ -501,7 +501,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, · 500 unmodified lines | ||
| 501 | 501 | /* |
| 502 | 502 | * Not linked in yet - no deadlock potential: |
| 503 | 503 | */ |
| 504 | − down_write_nested(&mm->mmap_sem, SINGLE_DEPTH_NESTING); | |
| 504 | + mmap_write_lock_nested(mm, SINGLE_DEPTH_NESTING); | |
| 505 | 505 | |
| 506 | 506 | /* No ordering required: file already has been exposed. */ |
| 507 | 507 | RCU_INIT_POINTER(mm->exe_file, get_mm_exe_file(oldmm)); |