diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-08-01 21:39:46 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-08-15 17:54:47 +0200 |
commit | a6b6d5b85abf4914bbceade5dddd54c345c64136 (patch) | |
tree | 2cca0a777a06004ba9e8a212ce8cf8f470f7fc68 /fs/nfs/delegation.c | |
parent | NFSv4: Use a mutex to protect the per-inode commit lists (diff) | |
download | linux-a6b6d5b85abf4914bbceade5dddd54c345c64136.tar.xz linux-a6b6d5b85abf4914bbceade5dddd54c345c64136.zip |
NFS: Use an atomic_long_t to count the number of requests
Rather than forcing us to take the inode->i_lock just in order to bump
the number.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r-- | fs/nfs/delegation.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index d7df5e67b0c1..606dd3871f66 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -1089,7 +1089,7 @@ bool nfs4_delegation_flush_on_close(const struct inode *inode) delegation = rcu_dereference(nfsi->delegation); if (delegation == NULL || !(delegation->type & FMODE_WRITE)) goto out; - if (nfsi->nrequests < delegation->pagemod_limit) + if (atomic_long_read(&nfsi->nrequests) < delegation->pagemod_limit) ret = false; out: rcu_read_unlock(); |