Skip to content

Commit

Permalink
locks: only remove leases associated with the file being closed
Browse files Browse the repository at this point in the history
We don't want to remove all leases just because one filp was closed.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
  • Loading branch information
Jeff Layton committed Feb 17, 2015
1 parent e084c1b commit c4e136c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c4e136c

Please sign in to comment.