X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Flocks.c;h=814c51d0de4739e4b89e9091e00c17f284c0e2ba;hb=e571b0ad3495be5793e54e21cd244c4545c49d88;hp=4f441e46cef47bc67b08a3e82b78f389dfbbf818;hpb=905cec410a8b0ff3afb1845d6fe7215e0259b717;p=~andy%2Flinux 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; }