aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
authorJeff Layton <jeff.layton@primarydata.com>2015-02-16 19:37:42 -0500
committerJeff Layton <jeff.layton@primarydata.com>2015-02-17 15:22:57 -0500
commitc4e136cda11cb5f87683dd5b154a2d15ea5898b3 (patch)
treec406f868cb504b5edd71a604ff02d91057d75e23 /fs/locks.c
parente084c1bd40926938ff8d26af3bde34396dd4d06d (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.c3
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)
2435 2435
2436 spin_lock(&ctx->flc_lock); 2436 spin_lock(&ctx->flc_lock);
2437 list_for_each_entry_safe(fl, tmp, &ctx->flc_lease, fl_list) 2437 list_for_each_entry_safe(fl, tmp, &ctx->flc_lease, fl_list)
2438 lease_modify(fl, F_UNLCK, &dispose); 2438 if (filp == fl->fl_file)
2439 lease_modify(fl, F_UNLCK, &dispose);
2439 spin_unlock(&ctx->flc_lock); 2440 spin_unlock(&ctx->flc_lock);
2440 locks_dispose_list(&dispose); 2441 locks_dispose_list(&dispose);
2441} 2442}