summaryrefslogtreecommitdiffstats
path: root/fs/nfs/iostat.h
diff options
context:
space:
mode:
authorLi RongQing2014-11-23 05:47:41 +0100
committerTrond Myklebust2014-11-25 02:08:47 +0100
commite9f456ca50e579dfacd996f50637f0bb0a585dfc (patch)
treef3a3e195865c445fedb40e65c20d6b4ae2fbb3a3 /fs/nfs/iostat.h
parentnfs: replace nfs_add_stats with nfs_inc_stats when add one (diff)
downloadkernel-qcow2-linux-e9f456ca50e579dfacd996f50637f0bb0a585dfc.tar.gz
kernel-qcow2-linux-e9f456ca50e579dfacd996f50637f0bb0a585dfc.tar.xz
kernel-qcow2-linux-e9f456ca50e579dfacd996f50637f0bb0a585dfc.zip
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)