summaryrefslogtreecommitdiffstats
path: root/fs/nfs/namespace.c
diff options
context:
space:
mode:
authorScott Mayhew <smayhew@redhat.com>2019-12-10 13:31:14 +0100
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-01-15 16:15:17 +0100
commit62a55d088cd87d480a6fd67b0d63b14ccae80838 (patch)
tree0ddc759236070f35409b58c8a30a01610978c6a1 /fs/nfs/namespace.c
parentNFS: Add fs_context support. (diff)
downloadlinux-62a55d088cd87d480a6fd67b0d63b14ccae80838.tar.xz
linux-62a55d088cd87d480a6fd67b0d63b14ccae80838.zip
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/namespace.c')
-rw-r--r--fs/nfs/namespace.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index 9b344fcd23b0..d537350c1fb7 100644
--- a/fs/nfs/namespace.c
+++ b/fs/nfs/namespace.c
@@ -176,8 +176,8 @@ struct vfsmount *nfs_d_automount(struct path *path)
ctx->version = client->rpc_ops->version;
ctx->minorversion = client->cl_minorversion;
- ctx->mount_info.nfs_mod = client->cl_nfs_mod;
- __module_get(ctx->mount_info.nfs_mod->owner);
+ ctx->nfs_mod = client->cl_nfs_mod;
+ __module_get(ctx->nfs_mod->owner);
ret = client->rpc_ops->submount(fc, server);
if (ret < 0) {
@@ -262,22 +262,22 @@ int nfs_do_submount(struct fs_context *fc)
int ret;
/* create a new volume representation */
- server = ctx->mount_info.nfs_mod->rpc_ops->clone_server(NFS_SB(ctx->clone_data.sb),
- ctx->mount_info.mntfh,
+ server = ctx->nfs_mod->rpc_ops->clone_server(NFS_SB(ctx->clone_data.sb),
+ ctx->mntfh,
ctx->clone_data.fattr,
ctx->selected_flavor);
if (IS_ERR(server))
return PTR_ERR(server);
- ctx->mount_info.server = server;
+ ctx->server = server;
buffer = kmalloc(4096, GFP_USER);
if (!buffer)
return -ENOMEM;
ctx->internal = true;
- ctx->mount_info.inherited_bsize = ctx->clone_data.sb->s_blocksize_bits;
+ ctx->clone_data.inherited_bsize = ctx->clone_data.sb->s_blocksize_bits;
p = nfs_devname(dentry, buffer, 4096);
if (IS_ERR(p)) {
@@ -302,7 +302,7 @@ int nfs_submount(struct fs_context *fc, struct nfs_server *server)
/* Look it up again to get its attributes */
err = server->nfs_client->rpc_ops->lookup(d_inode(parent), &dentry->d_name,
- ctx->mount_info.mntfh, ctx->clone_data.fattr,
+ ctx->mntfh, ctx->clone_data.fattr,
NULL);
dput(parent);
if (err != 0)