diff options
author | Rick Macklem <rmacklem@FreeBSD.org> | 2023-02-21 03:43:37 +0000 |
---|---|---|
committer | Rick Macklem <rmacklem@FreeBSD.org> | 2023-02-21 03:43:37 +0000 |
commit | ef4e8f0cf91f7009745d5a7a90d3bdd2d9e25780 (patch) | |
tree | b06d199f852cdf431cccf70f920c635c85f81825 | |
parent | 357492c99597d13bc966441f30bb44f6ef659f08 (diff) |
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
-rw-r--r-- | sys/fs/nfs/nfs_commonport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index 99482069c36d..212b498e6328 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -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), |