From: Jeff Layton Date: Tue, 17 Feb 2015 00:37:42 +0000 (-0500) Subject: locks: only remove leases associated with the file being closed X-Git-Tag: v5.15~16283^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4e136cda11cb5f87683dd5b154a2d15ea5898b3;p=platform%2Fkernel%2Flinux-starfive.git 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 --- diff --git a/fs/locks.c b/fs/locks.c index 7998f67..fe8f9f4 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); }