switch flock to fget_light/fput_light
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
20ba5d736f
commit
bdc689594b
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue