diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-08-01 22:39:46 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-08-15 18:54:47 +0300 |
commit | a6b6d5b85abf4914bbceade5dddd54c345c64136 (patch) | |
tree | 2cca0a777a06004ba9e8a212ce8cf8f470f7fc68 /fs/nfs/pagelist.c | |
parent | e824f99adaaf1ed0e03eac8574599af6d992163d (diff) | |
download | linux-a6b6d5b85abf4914bbceade5dddd54c345c64136.tar.xz |
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/pagelist.c')
-rw-r--r-- | fs/nfs/pagelist.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index af6731dd4324..ec97c301899b 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -258,9 +258,7 @@ nfs_page_group_init(struct nfs_page *req, struct nfs_page *prev) inode = page_file_mapping(req->wb_page)->host; set_bit(PG_INODE_REF, &req->wb_flags); kref_get(&req->wb_kref); - spin_lock(&inode->i_lock); - NFS_I(inode)->nrequests++; - spin_unlock(&inode->i_lock); + atomic_long_inc(&NFS_I(inode)->nrequests); } } } |