aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfssvc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r--fs/nfsd/nfssvc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 26c81149d49a..96fdbcab8d95 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -165,10 +165,12 @@ int nfsd_vers(int vers, enum vers_op change)
165 165
166int nfsd_nrthreads(void) 166int nfsd_nrthreads(void)
167{ 167{
168 if (nfsd_serv == NULL) 168 int rv = 0;
169 return 0; 169 mutex_lock(&nfsd_mutex);
170 else 170 if (nfsd_serv)
171 return nfsd_serv->sv_nrthreads; 171 rv = nfsd_serv->sv_nrthreads;
172 mutex_unlock(&nfsd_mutex);
173 return rv;
172} 174}
173 175
174static void nfsd_last_thread(struct svc_serv *serv) 176static void nfsd_last_thread(struct svc_serv *serv)