Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221746
b: refs/heads/master
c: 8896b93
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Nov 10, 2010
1 parent bc9a8c4 commit 877fc48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 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: 3df057ac9afe83c4af84016df3baf3a0eb1d3d33
refs/heads/master: 8896b93f42459b18b145c69d399b62870df48061
12 changes: 2 additions & 10 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,6 @@ static int do_fcntl_add_lease(unsigned int fd, struct file *filp, long arg)
{
struct file_lock *fl, *ret;
struct fasync_struct *new;
struct inode *inode = filp->f_path.dentry->d_inode;
int error;

fl = lease_alloc(filp, arg);
Expand All @@ -1520,7 +1519,7 @@ static int do_fcntl_add_lease(unsigned int fd, struct file *filp, long arg)
}
ret = fl;
lock_flocks();
error = __vfs_setlease(filp, arg, &fl);
error = __vfs_setlease(filp, arg, &ret);
if (error) {
unlock_flocks();
locks_free_lock(fl);
Expand All @@ -1538,14 +1537,7 @@ static int do_fcntl_add_lease(unsigned int fd, struct file *filp, long arg)
if (!fasync_insert_entry(fd, filp, &ret->fl_fasync, new))
new = NULL;

if (error < 0) {
/* remove lease just inserted by setlease */
fl->fl_type = F_UNLCK | F_INPROGRESS;
fl->fl_break_time = jiffies - 10;
time_out_leases(inode);
} else {
error = __f_setown(filp, task_pid(current), PIDTYPE_PID, 0);
}
error = __f_setown(filp, task_pid(current), PIDTYPE_PID, 0);
unlock_flocks();

out_free_fasync:
Expand Down

0 comments on commit 877fc48

Please sign in to comment.