Commit bdc68959 authored by Al Viro's avatar Al Viro

switch flock to fget_light/fput_light

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 20ba5d73
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment