diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-21 18:46:53 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-29 23:28:31 -0400 |
commit | bdc689594bf3ce967bc3a17ba5db3f23222dede0 (patch) | |
tree | a2cccd90c79d93654b138cce8bb4baedfbcd7493 /fs/locks.c | |
parent | 20ba5d736f5a42abbee3e14384ff2d0fdaef2e6d (diff) | |
download | linux-3.10-bdc689594bf3ce967bc3a17ba5db3f23222dede0.tar.gz linux-3.10-bdc689594bf3ce967bc3a17ba5db3f23222dede0.tar.bz2 linux-3.10-bdc689594bf3ce967bc3a17ba5db3f23222dede0.zip |
switch flock to fget_light/fput_light
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/locks.c b/fs/locks.c index 4f441e46cef..814c51d0de4 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; } |