krpc: Replace !jailed() with IS_DEFAULT_VNET()

Since svcpool_create() is now called from an initialization function,
!jailed() no longer works.  Replace it with IS_DEFAULT_VNET().

MFC after:	3 months
This commit is contained in:
Rick Macklem 2023-02-16 14:32:50 -08:00
parent c9539b8901
commit 780bae23b8

View File

@ -127,7 +127,7 @@ svcpool_create(const char *name, struct sysctl_oid_list *sysctl_base)
pool->sp_space_low = (pool->sp_space_high / 3) * 2;
sysctl_ctx_init(&pool->sp_sysctl);
if (!jailed(curthread->td_ucred) && sysctl_base) {
if (IS_DEFAULT_VNET(curvnet) && sysctl_base) {
SYSCTL_ADD_PROC(&pool->sp_sysctl, sysctl_base, OID_AUTO,
"minthreads", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
pool, 0, svcpool_minthread_sysctl, "I",