Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c606fb7 authored by Bryan Schumaker's avatar Bryan Schumaker Committed by Trond Myklebust
Browse files

NFS: Convert v3 into a module



This patch exports symbols and moves over the final structures needed by
the v3 module.  In addition, I also switch over to using IS_ENABLED() to
check if CONFIG_NFS_V3 or CONFIG_NFS_V3_MODULE are set.

The module (nfs3.ko) will be created in the same directory as nfs.ko and
will be automatically loaded the first time you try to mount over NFS v3.

Signed-off-by: default avatarBryan Schumaker <bjschuma@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent ddda8e0a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ config NFS_V2
	  If unsure, say Y.

config NFS_V3
	bool "NFS client support for NFS version 3"
	tristate "NFS client support for NFS version 3"
	depends on NFS_FS
	default y
	help
+4 −2
Original line number Diff line number Diff line
@@ -9,8 +9,6 @@ nfs-y := client.o dir.o file.o getroot.o inode.o super.o \
			   write.o namespace.o mount_clnt.o \
			   dns_resolve.o cache_lib.o
nfs-$(CONFIG_ROOT_NFS)	+= nfsroot.o
nfs-$(CONFIG_NFS_V3)	+= nfs3super.o nfs3client.o nfs3proc.o nfs3xdr.o
nfs-$(CONFIG_NFS_V3_ACL)	+= nfs3acl.o
nfs-$(CONFIG_NFS_V4)	+= nfs4proc.o nfs4xdr.o nfs4state.o nfs4renewd.o \
			   nfs4super.o nfs4file.o delegation.o idmap.o \
			   callback.o callback_xdr.o callback_proc.o \
@@ -27,6 +25,10 @@ nfs-$(CONFIG_NFS_FSCACHE) += fscache.o fscache-index.o
obj-$(CONFIG_NFS_V2) += nfs2.o
nfs2-y := nfs2super.o proc.o nfs2xdr.o

obj-$(CONFIG_NFS_V3) += nfs3.o
nfs3-y := nfs3super.o nfs3client.o nfs3proc.o nfs3xdr.o
nfs3-$(CONFIG_NFS_V3_ACL) += nfs3acl.o

obj-$(CONFIG_PNFS_FILE_LAYOUT) += nfs_layout_nfsv41_files.o
nfs_layout_nfsv41_files-y := nfs4filelayout.o nfs4filelayoutdev.o

+0 −5
Original line number Diff line number Diff line
@@ -149,10 +149,6 @@ EXPORT_SYMBOL_GPL(unregister_nfs_version);
 */
int __init nfs_register_versions(void)
{
	int err = init_nfs_v3();
	if (err)
		return err;

	return init_nfs_v4();
}

@@ -161,7 +157,6 @@ int __init nfs_register_versions(void)
 */
void nfs_unregister_versions(void)
{
	exit_nfs_v3();
	exit_nfs_v4();
}

+1 −0
Original line number Diff line number Diff line
@@ -1981,6 +1981,7 @@ void nfs_access_zap_cache(struct inode *inode)
	spin_unlock(&nfs_access_lru_lock);
	nfs_access_free_list(&head);
}
EXPORT_SYMBOL_GPL(nfs_access_zap_cache);

static struct nfs_access_entry *nfs_access_search_rbtree(struct inode *inode, struct rpc_cred *cred)
{
+1 −1
Original line number Diff line number Diff line
@@ -460,7 +460,7 @@ static void nfs_inode_dio_write_done(struct inode *inode)
	inode_dio_done(inode);
}

#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
#if IS_ENABLED(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq)
{
	struct nfs_pageio_descriptor desc;
Loading