From owner-dev-commits-src-all@freebsd.org Tue May 11 00:38:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47FB6647FAB; Tue, 11 May 2021 00:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FfJtS1bFlz4hDP; Tue, 11 May 2021 00:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 298926721; Tue, 11 May 2021 00:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14B0c8vI091406; Tue, 11 May 2021 00:38:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14B0c8m6091405; Tue, 11 May 2021 00:38:08 GMT (envelope-from git) Date: Tue, 11 May 2021 00:38:08 GMT Message-Id: <202105110038.14B0c8m6091405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: cb07628d9e7c - main - nfscl: Delete unneeded redundant MODULE_DEPEND() calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb07628d9e7c84019f99e2dfeadbe0957e5c22e8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2021 00:38:08 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=cb07628d9e7c84019f99e2dfeadbe0957e5c22e8 commit cb07628d9e7c84019f99e2dfeadbe0957e5c22e8 Author: Rick Macklem AuthorDate: 2021-05-11 00:34:29 +0000 Commit: Rick Macklem CommitDate: 2021-05-11 00:34:29 +0000 nfscl: Delete unneeded redundant MODULE_DEPEND() calls There are two module declarations in the nfscl.ko module for "nfscl" and "nfs". Both of these declarations had MODULE_DEPEND() calls. This patch deletes the MODULE_DEPEND() calls for "nfs" to avoid confusion with respect to what modules this module is dependent upon. The patch also adds comments explaining why there are two module declarations within the module. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D30102 --- sys/fs/nfsclient/nfs_clport.c | 9 +++++++++ sys/fs/nfsclient/nfs_clvfsops.c | 14 ++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index 492b93340e4e..4676f09f8e86 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -1438,6 +1438,14 @@ static moduledata_t nfscl_mod = { nfscl_modevent, NULL, }; +/* + * This is the main module declaration for the NFS client. The + * nfscl_modevent() function is needed to ensure that the module + * cannot be unloaded, among other things. + * There is also a module declaration in sys/fs/nfsclient/nfs_clvfsops.c + * for the name "nfs" within the VFS_SET() macro that defines the "nfs" + * file system type. + */ DECLARE_MODULE(nfscl, nfscl_mod, SI_SUB_VFS, SI_ORDER_FIRST); /* So that loader and kldload(2) can find us, wherever we are.. */ @@ -1445,3 +1453,4 @@ MODULE_VERSION(nfscl, 1); MODULE_DEPEND(nfscl, nfscommon, 1, 1, 1); MODULE_DEPEND(nfscl, krpc, 1, 1, 1); MODULE_DEPEND(nfscl, nfssvc, 1, 1, 1); +MODULE_DEPEND(nfscl, xdr, 1, 1, 1); diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index 08a25c6fe632..847bf72acf0c 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -148,14 +147,17 @@ static struct vfsops nfs_vfsops = { .vfs_sysctl = nfs_sysctl, .vfs_purge = nfs_purge, }; +/* + * This macro declares that the file system type is named "nfs". + * It also declares a module name of "nfs" and uses vfs_modevent() + * as the event handling function. + * The main module declaration is found in sys/fs/nfsclient/nfs_clport.c + * for "nfscl" and is needed so that a custom event handling + * function gets called. MODULE_DEPEND() macros are found there. + */ VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK | VFCF_SBDRY); -/* So that loader and kldload(2) can find us, wherever we are.. */ MODULE_VERSION(nfs, 1); -MODULE_DEPEND(nfs, nfscommon, 1, 1, 1); -MODULE_DEPEND(nfs, krpc, 1, 1, 1); -MODULE_DEPEND(nfs, nfssvc, 1, 1, 1); -MODULE_DEPEND(nfs, xdr, 1, 1, 1); /* * This structure is now defined in sys/nfs/nfs_diskless.c so that it