diff options
| author | Jeff Layton <jeff.layton@primarydata.com> | 2015-01-21 20:44:01 -0500 |
|---|---|---|
| committer | Jeff Layton <jeff.layton@primarydata.com> | 2015-01-21 20:44:01 -0500 |
| commit | 8116bf4cb62d337c953cfa5369ef4cf83e73140c (patch) | |
| tree | 8feb67e4e034365d84fcf59c397f2e2b2867c68b /include/linux | |
| parent | 3d8e560de4a076b302cb0cc17e998aaace2b176a (diff) | |
locks: update comments that refer to inode->i_flock
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index f87cb2f03103..ddd2fa7cefd3 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -925,12 +925,11 @@ int locks_in_grace(struct net *); | |||
| 925 | * FIXME: should we create a separate "struct lock_request" to help distinguish | 925 | * FIXME: should we create a separate "struct lock_request" to help distinguish |
| 926 | * these two uses? | 926 | * these two uses? |
| 927 | * | 927 | * |
| 928 | * The i_flock list is ordered by: | 928 | * The varous i_flctx lists are ordered by: |
| 929 | * | 929 | * |
| 930 | * 1) lock type -- FL_LEASEs first, then FL_FLOCK, and finally FL_POSIX | 930 | * 1) lock owner |
| 931 | * 2) lock owner | 931 | * 2) lock range start |
| 932 | * 3) lock range start | 932 | * 3) lock range end |
| 933 | * 4) lock range end | ||
| 934 | * | 933 | * |
| 935 | * Obviously, the last two criteria only matter for POSIX locks. | 934 | * Obviously, the last two criteria only matter for POSIX locks. |
| 936 | */ | 935 | */ |
| @@ -1992,8 +1991,9 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
| 1992 | { | 1991 | { |
| 1993 | /* | 1992 | /* |
| 1994 | * Since this check is lockless, we must ensure that any refcounts | 1993 | * Since this check is lockless, we must ensure that any refcounts |
| 1995 | * taken are done before checking inode->i_flock. Otherwise, we could | 1994 | * taken are done before checking i_flctx->flc_lease. Otherwise, we |
| 1996 | * end up racing with tasks trying to set a new lease on this file. | 1995 | * could end up racing with tasks trying to set a new lease on this |
| 1996 | * file. | ||
| 1997 | */ | 1997 | */ |
| 1998 | smp_mb(); | 1998 | smp_mb(); |
| 1999 | if (inode->i_flctx && !list_empty_careful(&inode->i_flctx->flc_lease)) | 1999 | 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) | |||
| 2005 | { | 2005 | { |
| 2006 | /* | 2006 | /* |
| 2007 | * Since this check is lockless, we must ensure that any refcounts | 2007 | * Since this check is lockless, we must ensure that any refcounts |
| 2008 | * taken are done before checking inode->i_flock. Otherwise, we could | 2008 | * taken are done before checking i_flctx->flc_lease. Otherwise, we |
| 2009 | * end up racing with tasks trying to set a new lease on this file. | 2009 | * could end up racing with tasks trying to set a new lease on this |
| 2010 | * file. | ||
| 2010 | */ | 2011 | */ |
| 2011 | smp_mb(); | 2012 | smp_mb(); |
| 2012 | if (inode->i_flctx && !list_empty_careful(&inode->i_flctx->flc_lease)) | 2013 | if (inode->i_flctx && !list_empty_careful(&inode->i_flctx->flc_lease)) |
