aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2015-01-16 15:05:57 -0500
committerJeff Layton <jeff.layton@primarydata.com>2015-01-16 16:08:49 -0500
commit6109c85037e53443f29fd39c0de69f578a1cf285 (patch)
tree56823d1615acbba20c858eed9d16cf443cd55872 /fs/nfsd/nfs4state.c
parenta7231a97467d5a0c36f82f581c76c12c034e4b80 (diff)
locks: add a dedicated spinlock to protect i_flctx lists
We can now add a dedicated spinlock without expanding struct inode. Change to using that to protect the various i_flctx lists. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Acked-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index fad821991369..80242f5bd621 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -5572,14 +5572,14 @@ check_for_locks(struct nfs4_file *fp, struct nfs4_lockowner *lowner)
5572 flctx = inode->i_flctx; 5572 flctx = inode->i_flctx;
5573 5573
5574 if (flctx && !list_empty_careful(&flctx->flc_posix)) { 5574 if (flctx && !list_empty_careful(&flctx->flc_posix)) {
5575 spin_lock(&inode->i_lock); 5575 spin_lock(&flctx->flc_lock);
5576 list_for_each_entry(fl, &flctx->flc_posix, fl_list) { 5576 list_for_each_entry(fl, &flctx->flc_posix, fl_list) {
5577 if (fl->fl_owner == (fl_owner_t)lowner) { 5577 if (fl->fl_owner == (fl_owner_t)lowner) {
5578 status = true; 5578 status = true;
5579 break; 5579 break;
5580 } 5580 }
5581 } 5581 }
5582 spin_unlock(&inode->i_lock); 5582 spin_unlock(&flctx->flc_lock);
5583 } 5583 }
5584 fput(filp); 5584 fput(filp);
5585 return status; 5585 return status;