Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320403
b: refs/heads/master
c: 3b6e272
h: refs/heads/master
i:
  320401: fb13001
  320399: fda9831
v: v3
  • Loading branch information
Filipe Brandenburger authored and J. Bruce Fields committed Jul 27, 2012
1 parent 7730c81 commit fba18a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 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: 57c8b13e3cd0f94944c9691ce7f58e5fcef8a12d
refs/heads/master: 3b6e2723f32de42028617f2c99b244ccd72cd959
17 changes: 6 additions & 11 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,18 +427,8 @@ static void lease_break_callback(struct file_lock *fl)
kill_fasync(&fl->fl_fasync, SIGIO, POLL_MSG);
}

static void lease_release_private_callback(struct file_lock *fl)
{
if (!fl->fl_file)
return;

f_delown(fl->fl_file);
fl->fl_file->f_owner.signum = 0;
}

static const struct lock_manager_operations lease_manager_ops = {
.lm_break = lease_break_callback,
.lm_release_private = lease_release_private_callback,
.lm_change = lease_modify,
};

Expand Down Expand Up @@ -1155,8 +1145,13 @@ int lease_modify(struct file_lock **before, int arg)
return error;
lease_clear_pending(fl, arg);
locks_wake_up_blocks(fl);
if (arg == F_UNLCK)
if (arg == F_UNLCK) {
struct file *filp = fl->fl_file;

f_delown(filp);
filp->f_owner.signum = 0;
locks_delete_lock(before);
}
return 0;
}

Expand Down

0 comments on commit fba18a0

Please sign in to comment.