Commit 53e40455 authored by Jeff Layton's avatar Jeff Layton Committed by Sasha Levin

locks: update comments that refer to inode->i_flock

[ Upstream commit 8116bf4c ]
Signed-off-by: default avatarJeff Layton <jlayton@primarydata.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 304e9bf2
...@@ -2171,7 +2171,7 @@ int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd, ...@@ -2171,7 +2171,7 @@ int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd,
*/ */
/* /*
* we need that spin_lock here - it prevents reordering between * 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. * rcu_read_lock() wouldn't do.
*/ */
spin_lock(&current->files->file_lock); spin_lock(&current->files->file_lock);
......
...@@ -906,12 +906,11 @@ int locks_in_grace(struct net *); ...@@ -906,12 +906,11 @@ int locks_in_grace(struct net *);
* FIXME: should we create a separate "struct lock_request" to help distinguish * FIXME: should we create a separate "struct lock_request" to help distinguish
* these two uses? * 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 * 1) lock owner
* 2) lock owner * 2) lock range start
* 3) lock range start * 3) lock range end
* 4) lock range end
* *
* Obviously, the last two criteria only matter for POSIX locks. * 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) ...@@ -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 * Since this check is lockless, we must ensure that any refcounts
* taken are done before checking inode->i_flock. Otherwise, we could * taken are done before checking i_flctx->flc_lease. Otherwise, we
* end up racing with tasks trying to set a new lease on this file. * could end up racing with tasks trying to set a new lease on this
* file.
*/ */
smp_mb(); smp_mb();
if (inode->i_flock) if (inode->i_flock)
...@@ -1959,8 +1959,9 @@ static inline int break_deleg(struct inode *inode, unsigned int mode) ...@@ -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 * Since this check is lockless, we must ensure that any refcounts
* taken are done before checking inode->i_flock. Otherwise, we could * taken are done before checking i_flctx->flc_lease. Otherwise, we
* end up racing with tasks trying to set a new lease on this file. * could end up racing with tasks trying to set a new lease on this
* file.
*/ */
smp_mb(); smp_mb();
if (inode->i_flock) if (inode->i_flock)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment