diff options
author | Jeff Layton <jeff.layton@primarydata.com> | 2015-02-16 19:37:42 -0500 |
---|---|---|
committer | Jeff Layton <jeff.layton@primarydata.com> | 2015-02-17 15:22:57 -0500 |
commit | c4e136cda11cb5f87683dd5b154a2d15ea5898b3 (patch) | |
tree | c406f868cb504b5edd71a604ff02d91057d75e23 /fs/locks.c | |
parent | e084c1bd40926938ff8d26af3bde34396dd4d06d (diff) |
locks: only remove leases associated with the file being closed
We don't want to remove all leases just because one filp was closed.
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c index 7998f670812c..fe8f9f46445b 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -2435,7 +2435,8 @@ locks_remove_lease(struct file *filp) spin_lock(&ctx->flc_lock); list_for_each_entry_safe(fl, tmp, &ctx->flc_lease, fl_list) - lease_modify(fl, F_UNLCK, &dispose); + if (filp == fl->fl_file) + lease_modify(fl, F_UNLCK, &dispose); spin_unlock(&ctx->flc_lock); locks_dispose_list(&dispose); } |