The branch main has been updated by rmacklem:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4d68605f31fb536722529dc90f16cc47d964882e

commit 4d68605f31fb536722529dc90f16cc47d964882e
Author:     Rick Macklem <[email protected]>
AuthorDate: 2023-02-12 02:27:59 +0000
Commit:     Rick Macklem <[email protected]>
CommitDate: 2023-02-12 02:27:59 +0000

    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
---
 sys/fs/nfsserver/nfs_nfsdport.c | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index af5327bd5a2d..834a6b069899 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -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 @@ out:
        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);

Reply via email to