nfscommon: Use IS_DEFAULT_VNET() in the vnet initialization

Another oopsie.  The vnet initialization function in
nfs_commonport.c for initializing prison0 by testing
curthread->td_ucred->cr_prison == &prison0. This is bogus
and always true.  Replace it with IS_DEFAULT_VNET(curvnet).

MFC after:	3 months
This commit is contained in:
Rick Macklem 2023-02-20 19:43:37 -08:00
parent 357492c995
commit ef4e8f0cf9

View File

@ -877,7 +877,7 @@ static void
nfs_vnetinit(const void *unused __unused)
{
if (curthread->td_ucred->cr_prison == &prison0)
if (IS_DEFAULT_VNET(curvnet))
NFSD_VNET(nfsstatsv1_p) = &nfsstatsv1;
else
NFSD_VNET(nfsstatsv1_p) = malloc(sizeof(struct nfsstatsv1),