Skip to content

Commit 6c0483d

Browse files
committed
Merge tag 'nfsd-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd fixes from Chuck Lever: - Due to a late review, revert and re-fix a recent crasher fix * tag 'nfsd-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: Revert "nfsd: fix oops when reading pool_stats before server is started" nfsd: initialise nfsd_info.mutex early.
2 parents cd63a27 + ac03629 commit 6c0483d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

fs/nfsd/nfsctl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,6 +2169,8 @@ static __net_init int nfsd_net_init(struct net *net)
21692169
nn->nfsd_svcstats.program = &nfsd_program;
21702170
nn->nfsd_versions = NULL;
21712171
nn->nfsd4_minorversions = NULL;
2172+
nn->nfsd_info.mutex = &nfsd_mutex;
2173+
nn->nfsd_serv = NULL;
21722174
nfsd4_init_leases_net(nn);
21732175
get_random_bytes(&nn->siphash_key, sizeof(nn->siphash_key));
21742176
seqlock_init(&nn->writeverf_lock);

fs/nfsd/nfssvc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,6 @@ int nfsd_create_serv(struct net *net)
672672
return error;
673673
}
674674
spin_lock(&nfsd_notifier_lock);
675-
nn->nfsd_info.mutex = &nfsd_mutex;
676675
nn->nfsd_serv = serv;
677676
spin_unlock(&nfsd_notifier_lock);
678677

net/sunrpc/svc_xprt.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,13 +1421,12 @@ static void *svc_pool_stats_start(struct seq_file *m, loff_t *pos)
14211421

14221422
dprintk("svc_pool_stats_start, *pidx=%u\n", pidx);
14231423

1424-
if (!si->serv)
1425-
return NULL;
1426-
14271424
mutex_lock(si->mutex);
14281425

14291426
if (!pidx)
14301427
return SEQ_START_TOKEN;
1428+
if (!si->serv)
1429+
return NULL;
14311430
return pidx > si->serv->sv_nrpools ? NULL
14321431
: &si->serv->sv_pools[pidx - 1];
14331432
}
@@ -1459,8 +1458,7 @@ static void svc_pool_stats_stop(struct seq_file *m, void *p)
14591458
{
14601459
struct svc_info *si = m->private;
14611460

1462-
if (si->serv)
1463-
mutex_unlock(si->mutex);
1461+
mutex_unlock(si->mutex);
14641462
}
14651463

14661464
static int svc_pool_stats_show(struct seq_file *m, void *p)

0 commit comments

Comments
 (0)