nfsd: Fix initialization broken by 7344856e3a6d

Oops, although the vneting macros do not do anything yet,
commit 7344856e3a6d did change where things are initialized
and one of the initialization functions was not being called
early enough.  This patch moves nfsrvd_init(0) to the
function called via (VNET_)SYSINIT() to fix this.

Reported by:	olivier
MFC after:	3 months
This commit is contained in:
Rick Macklem 2023-02-12 09:16:56 -08:00
parent 6d7da7c849
commit fcfdb76e12
2 changed files with 1 additions and 1 deletions

View File

@ -531,7 +531,6 @@ nfsrvd_nfsd(struct thread *td, struct nfsd_nfsd_args *args)
*/
NFSD_LOCK();
if (NFSD_VNET(nfsrv_numnfsd) == 0) {
nfsrvd_init(0);
nfsdev_time = time_second;
p = td->td_proc;
PROC_LOCK(p);

View File

@ -3532,6 +3532,7 @@ nfsd_mntinit(void)
return;
}
NFSD_VNET(nfsrv_mntinited) = true;
nfsrvd_init(0);
NFSD_UNLOCK();
if (curthread->td_ucred->cr_prison == &prison0)