summaryrefslogtreecommitdiff
path: root/fs/nfs/iostat.h
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2014-11-23 07:47:41 +0300
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-11-25 04:08:47 +0300
commite9f456ca50e579dfacd996f50637f0bb0a585dfc (patch)
treef3a3e195865c445fedb40e65c20d6b4ae2fbb3a3 /fs/nfs/iostat.h
parent5a254d08b086d80cbead2ebcee6d2a4b3a15587a (diff)
downloadlinux-e9f456ca50e579dfacd996f50637f0bb0a585dfc.tar.xz
nfs: define nfs_inc_fscache_stats and using it as possible
Define and use nfs_inc_fscache_stats when plus one, which can save to pass one parameter. Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/iostat.h')
-rw-r--r--fs/nfs/iostat.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/iostat.h b/fs/nfs/iostat.h
index c5832487c456..0cb806fbd4c4 100644
--- a/fs/nfs/iostat.h
+++ b/fs/nfs/iostat.h
@@ -55,6 +55,11 @@ static inline void nfs_add_fscache_stats(struct inode *inode,
{
this_cpu_add(NFS_SERVER(inode)->io_stats->fscache[stat], addend);
}
+static inline void nfs_inc_fscache_stats(struct inode *inode,
+ enum nfs_stat_fscachecounters stat)
+{
+ this_cpu_inc(NFS_SERVER(inode)->io_stats->fscache[stat]);
+}
#endif
static inline struct nfs_iostats __percpu *nfs_alloc_iostats(void)