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>
This commit is contained in:

committed by
Anna Schumaker

parent
f2aedb713c
commit
62a55d088c
@@ -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)
|
||||
|
Reference in New Issue
Block a user