nfsd: Delete nfsrv_prison_cleanup() until vneting enabled

Oops, although the vneting macros do not do anything yet,
commit 7344856e3a6d enabled the prison cleanup function, that
would get called and crash the system when a jail was terminated.

This patch gets rid of nfsrv_prison_cleanup() for now.
It can go in when the vnet macros are enabled as
front ends to the vnet macros.

MFC after:	3 months
This commit is contained in:
Rick Macklem 2023-02-11 18:27:59 -08:00
parent 7e44856e3a
commit 4d68605f31

View File

@ -94,7 +94,6 @@ static char nfsd_master_comm[MAXCOMLEN + 1];
static struct timeval nfsd_master_start;
static uint32_t nfsv4_sysid = 0;
static fhandle_t zerofh;
static int nfsrv_osd_jail_slot;
NFSD_VNET_DEFINE(struct proc *, nfsd_master_proc) = NULL;
NFSD_VNET_DEFINE(struct nfsrvhashhead *, nfsrvudphashtbl);
@ -3687,18 +3686,6 @@ nfsvno_v4rootexport(struct nfsrv_descript *nd)
return (error);
}
/* Osd entry for nfsrv_cleanup. */
static int
nfsrv_prison_cleanup(void *obj, void *data __unused)
{
struct prison *pr = obj;
if ((pr->pr_flags & PR_VNET) == 0)
return (0);
nfsrv_cleanup(pr);
return (0);
}
/*
* Nfs server pseudo system call for the nfsd's
*/
@ -7123,7 +7110,7 @@ nfsrv_vnetinit(const void *unused __unused)
nfsd_mntinit();
}
VNET_SYSINIT(nfsrv_vnetinit, SI_SUB_VNET_DONE, SI_ORDER_ANY,
SYSINIT(nfsrv_vnetinit, SI_SUB_VNET_DONE, SI_ORDER_ANY,
nfsrv_vnetinit, NULL);
/*
@ -7193,9 +7180,6 @@ static int
nfsd_modevent(module_t mod, int type, void *data)
{
int error = 0, i;
osd_method_t methods[PR_MAXMETHOD] = {
[PR_METHOD_REMOVE] = nfsrv_prison_cleanup,
};
static int loaded = 0;
switch (type) {
@ -7212,8 +7196,6 @@ nfsd_modevent(module_t mod, int type, void *data)
vn_deleg_ops.vndeleg_disable = nfsd_disabledelegation;
#endif
nfsd_call_nfsd = nfssvc_nfsd;
/* XXX-BZ OSD to VNET? */
nfsrv_osd_jail_slot = osd_jail_register(NULL, methods);
loaded = 1;
break;
@ -7228,7 +7210,6 @@ nfsd_modevent(module_t mod, int type, void *data)
vn_deleg_ops.vndeleg_disable = NULL;
#endif
nfsd_call_nfsd = NULL;
osd_jail_deregister(nfsrv_osd_jail_slot);
nfsrv_cleanup(&prison0);
mtx_destroy(&nfsrc_udpmtx);
mtx_destroy(&nfs_v4root_mutex);