From 62a55d088cd87d480a6fd67b0d63b14ccae80838 Mon Sep 17 00:00:00 2001 From: Scott Mayhew Date: Tue, 10 Dec 2019 07:31:14 -0500 Subject: NFS: Additional refactoring for fs_context conversion Split out from commit "NFS: Add fs_context support." This patch adds additional refactoring for the conversion of NFS to use fs_context, namely: (*) Merge nfs_mount_info and nfs_clone_mount into nfs_fs_context. nfs_clone_mount has had several fields removed, and nfs_mount_info has been removed altogether. (*) Various functions now take an fs_context as an argument instead of nfs_mount_info, nfs_fs_context, etc. Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker --- fs/nfs/nfs4super.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'fs/nfs/nfs4super.c') diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index 469726410c5c..7d5ed37633d8 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c @@ -35,12 +35,12 @@ static const struct super_operations nfs4_sops = { }; struct nfs_subversion nfs_v4 = { - .owner = THIS_MODULE, - .nfs_fs = &nfs4_fs_type, - .rpc_vers = &nfs_version4, - .rpc_ops = &nfs_v4_clientops, - .sops = &nfs4_sops, - .xattr = nfs4_xattr_handlers, + .owner = THIS_MODULE, + .nfs_fs = &nfs4_fs_type, + .rpc_vers = &nfs_version4, + .rpc_ops = &nfs_v4_clientops, + .sops = &nfs4_sops, + .xattr = nfs4_xattr_handlers, }; static int nfs4_write_inode(struct inode *inode, struct writeback_control *wbc) @@ -168,7 +168,7 @@ static int do_nfs4_mount(struct nfs_server *server, root_ctx = nfs_fc2context(root_fc); root_ctx->internal = true; - root_ctx->mount_info.server = server; + root_ctx->server = server; /* We leave export_path unset as it's not used to find the root. */ len = strlen(hostname) + 5; @@ -221,7 +221,7 @@ int nfs4_try_get_tree(struct fs_context *fc) /* We create a mount for the server's root, walk to the requested * location and then create another mount for that. */ - err= do_nfs4_mount(nfs4_create_server(&ctx->mount_info), + err= do_nfs4_mount(nfs4_create_server(fc), fc, ctx->nfs_server.hostname, ctx->nfs_server.export_path); if (err) { @@ -243,7 +243,7 @@ int nfs4_get_referral_tree(struct fs_context *fc) dprintk("--> nfs4_referral_mount()\n"); /* create a new volume representation */ - err = do_nfs4_mount(nfs4_create_referral_server(&ctx->clone_data, ctx->mount_info.mntfh), + err = do_nfs4_mount(nfs4_create_referral_server(fc), fc, ctx->nfs_server.hostname, ctx->nfs_server.export_path); if (err) { @@ -254,7 +254,6 @@ int nfs4_get_referral_tree(struct fs_context *fc) return err; } - static int __init init_nfs_v4(void) { int err; -- cgit v1.2.3-59-g8ed1b