diff options
author | Scott Mayhew <smayhew@redhat.com> | 2019-12-10 07:31:14 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2020-01-15 10:15:17 -0500 |
commit | 62a55d088cd87d480a6fd67b0d63b14ccae80838 (patch) | |
tree | 0ddc759236070f35409b58c8a30a01610978c6a1 /fs/nfs/nfs4super.c | |
parent | f2aedb713c284429987dc66c7aaf38decfc8da2a (diff) | |
download | linux-62a55d088cd87d480a6fd67b0d63b14ccae80838.tar.bz2 |
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 <smayhew@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/nfs4super.c')
-rw-r--r-- | fs/nfs/nfs4super.c | 19 |
1 files changed, 9 insertions, 10 deletions
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; |