diff options
| author | Lorenzo Stoakes <lorenzo.stoakes@oracle.com> | 2025-07-25 09:29:43 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-08-02 12:06:09 -0700 |
| commit | 8b2914162aa3a56062d4b7c716149946672d48a6 (patch) | |
| tree | 6f0735f63b1f5be9561ddcc4eec26dd3a8b65555 /mm/madvise.c | |
| parent | d0b47a6866f1047247061f3a38f12a981825b265 (diff) | |
| download | tip-8b2914162aa3a56062d4b7c716149946672d48a6.tar.gz | |
mm/mseal: small cleanups
Drop the wholly unnecessary set_vma_sealed() helper(), which is used only
once, and place VMA_ITERATOR() declarations in the correct place.
Retain vma_is_sealed(), and use it instead of the confusingly named
can_modify_vma(), so it's abundantly clear what's being tested, rather
then a nebulous sense of 'can the VMA be modified'.
No functional change intended.
Link: https://lkml.kernel.org/r/98cf28d04583d632a6eb698e9ad23733bb6af26b.1753431105.git.lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Jeff Xu <jeffxu@chromium.org>
Cc: Jann Horn <jannh@google.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/madvise.c')
| -rw-r--r-- | mm/madvise.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/madvise.c b/mm/madvise.c index 7f9af2dbd044f2..35ed4ab0d7c53b 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -1287,7 +1287,7 @@ static bool can_madvise_modify(struct madvise_behavior *madv_behavior) struct vm_area_struct *vma = madv_behavior->vma; /* If the VMA isn't sealed we're good. */ - if (can_modify_vma(vma)) + if (!vma_is_sealed(vma)) return true; /* For a sealed VMA, we only care about discard operations. */ |
