mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
locks: eliminate fl_mylease callback
The nfs server only supports read delegations for now, so we don't care how conflicts are determined. All we care is that unlocks are recognized as matching the leases they are meant to remove. After the last patch, a comparison of struct files will work for that purpose. So we no longer need this callback. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
c84d500bc4
commit
c45821d263
3 changed files with 2 additions and 28 deletions
|
@ -444,15 +444,9 @@ static void lease_release_private_callback(struct file_lock *fl)
|
|||
fl->fl_file->f_owner.signum = 0;
|
||||
}
|
||||
|
||||
static int lease_mylease_callback(struct file_lock *fl, struct file_lock *try)
|
||||
{
|
||||
return fl->fl_file == try->fl_file;
|
||||
}
|
||||
|
||||
static const struct lock_manager_operations lease_manager_ops = {
|
||||
.fl_break = lease_break_callback,
|
||||
.fl_release_private = lease_release_private_callback,
|
||||
.fl_mylease = lease_mylease_callback,
|
||||
.fl_change = lease_modify,
|
||||
};
|
||||
|
||||
|
@ -1405,7 +1399,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp)
|
|||
for (before = &inode->i_flock;
|
||||
((fl = *before) != NULL) && IS_LEASE(fl);
|
||||
before = &fl->fl_next) {
|
||||
if (lease->fl_lmops->fl_mylease(fl, lease))
|
||||
if (fl->fl_file == lease->fl_file)
|
||||
my_before = before;
|
||||
else if (fl->fl_type == (F_INPROGRESS | F_UNLCK))
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue