summaryrefslogtreecommitdiff
path: root/fs/nfsd/stats.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2021-11-29 07:51:25 +0300
committerChuck Lever <chuck.lever@oracle.com>2021-12-13 21:42:51 +0300
commit9b6c8c9bebccd5fb785c306b948c08874a88874d (patch)
tree8998256835b130819b13a728f521e0b31b407f9d /fs/nfsd/stats.c
parentec52361df99b490f6af412b046df9799b92c1050 (diff)
downloadlinux-9b6c8c9bebccd5fb785c306b948c08874a88874d.tar.xz
nfsd: make nfsd_stats.th_cnt atomic_t
This allows us to move the updates for th_cnt out of the mutex. This is a step towards reducing mutex coverage in nfsd(). Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/stats.c')
-rw-r--r--fs/nfsd/stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/stats.c b/fs/nfsd/stats.c
index 1d3b881e7382..a8c5a02a84f0 100644
--- a/fs/nfsd/stats.c
+++ b/fs/nfsd/stats.c
@@ -45,7 +45,7 @@ static int nfsd_proc_show(struct seq_file *seq, void *v)
percpu_counter_sum_positive(&nfsdstats.counter[NFSD_STATS_IO_WRITE]));
/* thread usage: */
- seq_printf(seq, "th %u 0", nfsdstats.th_cnt);
+ seq_printf(seq, "th %u 0", atomic_read(&nfsdstats.th_cnt));
/* deprecated thread usage histogram stats */
for (i = 0; i < 10; i++)