git: fcfdb76e12fb - main - nfsd: Fix initialization broken by 7344856e3a6d
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 12 Feb 2023 17:19:31 UTC
The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=fcfdb76e12fb3cdf584e6f06e56e7c48ec475cc6 commit fcfdb76e12fb3cdf584e6f06e56e7c48ec475cc6 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2023-02-12 17:16:56 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2023-02-12 17:16:56 +0000 nfsd: Fix initialization broken by 7344856e3a6d Oops, although the vneting macros do not do anything yet, commit 7344856e3a6d did change where things are initialized and one of the initialization functions was not being called early enough. This patch moves nfsrvd_init(0) to the function called via (VNET_)SYSINIT() to fix this. Reported by: olivier MFC after: 3 months --- sys/fs/nfsserver/nfs_nfsdkrpc.c | 1 - sys/fs/nfsserver/nfs_nfsdport.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsserver/nfs_nfsdkrpc.c b/sys/fs/nfsserver/nfs_nfsdkrpc.c index 696af8a0e409..45459d115346 100644 --- a/sys/fs/nfsserver/nfs_nfsdkrpc.c +++ b/sys/fs/nfsserver/nfs_nfsdkrpc.c @@ -531,7 +531,6 @@ nfsrvd_nfsd(struct thread *td, struct nfsd_nfsd_args *args) */ NFSD_LOCK(); if (NFSD_VNET(nfsrv_numnfsd) == 0) { - nfsrvd_init(0); nfsdev_time = time_second; p = td->td_proc; PROC_LOCK(p); diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 834a6b069899..bcc49f8bcac3 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3532,6 +3532,7 @@ nfsd_mntinit(void) return; } NFSD_VNET(nfsrv_mntinited) = true; + nfsrvd_init(0); NFSD_UNLOCK(); if (curthread->td_ucred->cr_prison == &prison0)