Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309980
b: refs/heads/master
c: bdc6895
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed May 30, 2012
1 parent e6346f3 commit e4cee8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20ba5d736f5a42abbee3e14384ff2d0fdaef2e6d
refs/heads/master: bdc689594bf3ce967bc3a17ba5db3f23222dede0
5 changes: 3 additions & 2 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e4cee8d

Please sign in to comment.