summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jeff.layton@primarydata.com>2015-01-21 20:44:01 -0500
committerSasha Levin <sasha.levin@oracle.com>2016-02-09 22:56:32 -0500
commit53e404555067d3a9389ebe9d3a3e797cdd0fe440 (patch)
tree909318822241d03528a98a4fa48ac1303f5adc71
parent304e9bf286d4050fa02e4c9944ef47c98ebf0193 (diff)
locks: update comments that refer to inode->i_flock
[ Upstream commit 8116bf4cb62d337c953cfa5369ef4cf83e73140c ] Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r--fs/locks.c2
-rw-r--r--include/linux/fs.h19
2 files changed, 11 insertions, 10 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 59e2f905e4ff..3a53d1b20776 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2171,7 +2171,7 @@ again:
*/
/*
* we need that spin_lock here - it prevents reordering between
- * update of inode->i_flock and check for it done in close().
+ * update of i_flctx->flc_posix and check for it done in close().
* rcu_read_lock() wouldn't do.
*/
spin_lock(&current->files->file_lock);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6fd017e25c0a..58f6ab319996 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -906,12 +906,11 @@ int locks_in_grace(struct net *);
* FIXME: should we create a separate "struct lock_request" to help distinguish
* these two uses?
*
- * The i_flock list is ordered by:
+ * The varous i_flctx lists are ordered by:
*
- * 1) lock type -- FL_LEASEs first, then FL_FLOCK, and finally FL_POSIX
- * 2) lock owner
- * 3) lock range start
- * 4) lock range end
+ * 1) lock owner
+ * 2) lock range start
+ * 3) lock range end
*
* Obviously, the last two criteria only matter for POSIX locks.
*/
@@ -1946,8 +1945,9 @@ static inline int break_lease(struct inode *inode, unsigned int mode)
{
/*
* Since this check is lockless, we must ensure that any refcounts
- * taken are done before checking inode->i_flock. Otherwise, we could
- * end up racing with tasks trying to set a new lease on this file.
+ * taken are done before checking i_flctx->flc_lease. Otherwise, we
+ * could end up racing with tasks trying to set a new lease on this
+ * file.
*/
smp_mb();
if (inode->i_flock)
@@ -1959,8 +1959,9 @@ static inline int break_deleg(struct inode *inode, unsigned int mode)
{
/*
* Since this check is lockless, we must ensure that any refcounts
- * taken are done before checking inode->i_flock. Otherwise, we could
- * end up racing with tasks trying to set a new lease on this file.
+ * taken are done before checking i_flctx->flc_lease. Otherwise, we
+ * could end up racing with tasks trying to set a new lease on this
+ * file.
*/
smp_mb();
if (inode->i_flock)