summaryrefslogtreecommitdiff
path: root/fs/super.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2022-07-16 21:35:31 -0700
committerJeff Layton <jlayton@kernel.org>2022-07-18 10:01:41 -0400
commit4149be7bda7e1b922896599dd9cee7a3ed8cf38b (patch)
treea6568e196571ab911c819d7f28b25ffec9408368 /fs/super.c
parentff6992735ade75aae3e35d16b17da1008d753d28 (diff)
fs/lock: Don't allocate file_lock in flock_make_lock().
Two functions, flock syscall and locks_remove_flock(), call flock_make_lock(). It allocates struct file_lock from slab cache if its argument fl is NULL. When we call flock syscall, we pass NULL to allocate memory for struct file_lock. However, we always free it at the end by locks_free_lock(). We need not allocate it and instead should use a local variable as locks_remove_flock() does. Also, the validation for flock_translate_cmd() is not necessary for locks_remove_flock(). So we move the part to flock syscall and make flock_make_lock() return nothing. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs/super.c')
0 files changed, 0 insertions, 0 deletions