From: Al Viro Date: Sat, 21 Apr 2012 22:46:53 +0000 (-0400) Subject: switch flock to fget_light/fput_light X-Git-Tag: v5.15~22311^2~89 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=bdc689594bf3ce967bc3a17ba5db3f23222dede0;p=mirror_ubuntu-kernels.git switch flock to fget_light/fput_light Signed-off-by: Al Viro --- diff --git a/fs/locks.c b/fs/locks.c index 4f441e46cef4..814c51d0de47 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1636,12 +1636,13 @@ EXPORT_SYMBOL(flock_lock_file_wait); SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) { struct file *filp; + int fput_needed; struct file_lock *lock; int can_sleep, unlock; int error; error = -EBADF; - filp = fget(fd); + filp = fget_light(fd, &fput_needed); if (!filp) goto out; @@ -1674,7 +1675,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) locks_free_lock(lock); out_putf: - fput(filp); + fput_light(filp, fput_needed); out: return error; }