summaryrefslogtreecommitdiffstats
path: root/mm/secretmem.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-05-22 22:52:10 +0200
committerAndrew Morton <akpm@linux-foundation.org>2023-06-10 01:25:38 +0200
commitb0cc5e89caadc21c2d8f7dc4c97947761b358876 (patch)
tree962c8873aab85381c33af16c361313ffae02fa78 /mm/secretmem.c
parentmm/mmap: refactor mlock_future_check() (diff)
downloadlinux-b0cc5e89caadc21c2d8f7dc4c97947761b358876.tar.xz
linux-b0cc5e89caadc21c2d8f7dc4c97947761b358876.zip
mm/mlock: rename mlock_future_check() to mlock_future_ok()
It is felt that the name mlock_future_check() is vague - it doesn't particularly convey the function's operation. mlock_future_ok() is a clearer name for a predicate function. Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Liam Howlett <liam.howlett@oracle.com> Cc: Lorenzo Stoakes <lstoakes@gmail.com> Cc: Mike Rapoport (IBM) <rppt@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/secretmem.c')
-rw-r--r--mm/secretmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/secretmem.c b/mm/secretmem.c
index 58d2af12df4f..86442a15d12f 100644
--- a/mm/secretmem.c
+++ b/mm/secretmem.c
@@ -125,7 +125,7 @@ static int secretmem_mmap(struct file *file, struct vm_area_struct *vma)
if ((vma->vm_flags & (VM_SHARED | VM_MAYSHARE)) == 0)
return -EINVAL;
- if (!mlock_future_check(vma->vm_mm, vma->vm_flags | VM_LOCKED, len))
+ if (!mlock_future_ok(vma->vm_mm, vma->vm_flags | VM_LOCKED, len))
return -EAGAIN;
vm_flags_set(vma, VM_LOCKED | VM_DONTDUMP);