diff options
| author | Mark Brown <broonie@kernel.org> | 2026-07-23 13:42:58 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-07-23 13:43:02 +0100 |
| commit | cdae9963d80ffb6351ae94b866d6c05ff456952c (patch) | |
| tree | 655f312daba7c56c037ce5013ad0816a112b6ce4 /include/linux/mmap_lock.h | |
| parent | b60d1fe05289a42ca691c26825503cc3d31305e2 (diff) | |
| parent | 71a7a58818a33631c9518f944cef5ca55aba6537 (diff) | |
| download | linux-next-cdae9963d80ffb6351ae94b866d6c05ff456952c.tar.gz linux-next-cdae9963d80ffb6351ae94b866d6c05ff456952c.zip | |
Merge branch 'mm-unstable' of https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Diffstat (limited to 'include/linux/mmap_lock.h')
| -rw-r--r-- | include/linux/mmap_lock.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mmap_lock.h b/include/linux/mmap_lock.h index 047f5f5e2c34..87f77e3da77f 100644 --- a/include/linux/mmap_lock.h +++ b/include/linux/mmap_lock.h @@ -506,6 +506,8 @@ static inline __must_check int vma_start_write_killable(struct vm_area_struct *vma) { return 0; } static inline void vma_assert_write_locked(struct vm_area_struct *vma) { mmap_assert_write_locked(vma->vm_mm); } +static inline bool vma_is_attached(struct vm_area_struct *vma) + { return true; } static inline void vma_assert_attached(struct vm_area_struct *vma) {} static inline void vma_assert_detached(struct vm_area_struct *vma) {} static inline void vma_mark_attached(struct vm_area_struct *vma) {} @@ -530,6 +532,12 @@ static inline void vma_assert_stabilised(struct vm_area_struct *vma) #endif /* CONFIG_PER_VMA_LOCK */ +static inline void vma_assert_can_modify(struct vm_area_struct *vma) +{ + if (vma_is_attached(vma)) + vma_assert_write_locked(vma); +} + static inline void mmap_write_lock(struct mm_struct *mm) { __mmap_lock_trace_start_locking(mm, true); |
