[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1424177190-14252-5-git-send-email-jeff.layton@primarydata.com>
Date: Tue, 17 Feb 2015 07:46:30 -0500
From: Jeff Layton <jeff.layton@...marydata.com>
To: linux-fsdevel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Kirill A. Shutemov" <kirill@...temov.name>,
"J. Bruce Fields" <bfields@...ldses.org>,
Christoph Hellwig <hch@....de>,
Dave Chinner <david@...morbit.com>,
Sasha Levin <sasha.levin@...cle.com>
Subject: [PATCH 4/4] 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@...marydata.com>
---
fs/locks.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/locks.c b/fs/locks.c
index 59eadd416b8c..c748176fde6a 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2437,7 +2437,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);
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists