locks: update comments that refer to inode->i_flock
authorJeff Layton <jeff.layton@primarydata.com>
Thu, 22 Jan 2015 01:44:01 +0000 (20:44 -0500)
committerJeff Layton <jeff.layton@primarydata.com>
Thu, 22 Jan 2015 01:44:01 +0000 (20:44 -0500)
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
fs/locks.c
include/linux/fs.h

index 2fc36b3772a02948b429ace2a6ceaca188c9b711..4d0d41163a50fedbe7c9b7d81911c5d5f2fbec6f 100644 (file)
@@ -2212,7 +2212,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);
index f87cb2f03103373be88fee94f4e69d17bfbdf8d3..ddd2fa7cefd3368acf311080bd1b62de09ca4fa5 100644 (file)
@@ -925,12 +925,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.
  */
@@ -1992,8 +1991,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_flctx && !list_empty_careful(&inode->i_flctx->flc_lease))
@@ -2005,8 +2005,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_flctx && !list_empty_careful(&inode->i_flctx->flc_lease))
This page took 0.030315 seconds and 5 git commands to generate.