summaryrefslogtreecommitdiff
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-12-10 15:30:55 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-01-15 18:15:16 +0300
commit250d69f6a465e36a6ab8602030267de2586e028f (patch)
tree8edaae969ee3936dee2cc262ded26112dd08b320 /fs/nfs/super.c
parent4e357761bd44bbba3c3af226c2cc216beff0935c (diff)
downloadlinux-250d69f6a465e36a6ab8602030267de2586e028f.tar.xz
nfs: lift setting mount_info from nfs_xdev_mount()
Do it in nfs_do_submount() instead. As a side benefit, nfs_clone_data doesn't need ->fh and ->fattr anymore. Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 379c7b26051d..97dc544eb220 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2395,7 +2395,7 @@ EXPORT_SYMBOL_GPL(nfs_fill_super);
/*
* Finish setting up a cloned NFS2/3/4 superblock
*/
-static void nfs_clone_super(struct super_block *sb,
+void nfs_clone_super(struct super_block *sb,
struct nfs_mount_info *mount_info)
{
const struct super_block *old_sb = mount_info->cloned->sb;
@@ -2796,27 +2796,10 @@ static struct dentry *
nfs_xdev_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *raw_data)
{
- struct nfs_clone_mount *data = raw_data;
- struct nfs_mount_info mount_info = {
- .fill_super = nfs_clone_super,
- .set_security = nfs_clone_sb_security,
- .cloned = data,
- };
- struct dentry *mntroot = ERR_PTR(-ENOMEM);
- struct nfs_subversion *nfs_mod = NFS_SB(data->sb)->nfs_client->cl_nfs_mod;
-
- dprintk("--> nfs_xdev_mount()\n");
+ struct nfs_mount_info *info = raw_data;
+ struct nfs_subversion *nfs_mod = NFS_SB(info->cloned->sb)->nfs_client->cl_nfs_mod;
- mount_info.mntfh = mount_info.cloned->fh;
-
- /* create a new volume representation */
- mount_info.server = nfs_mod->rpc_ops->clone_server(NFS_SB(data->sb), data->fh, data->fattr, data->authflavor);
-
- mntroot = nfs_fs_mount_common(flags, dev_name, &mount_info, nfs_mod);
-
- dprintk("<-- nfs_xdev_mount() = %ld\n",
- IS_ERR(mntroot) ? PTR_ERR(mntroot) : 0L);
- return mntroot;
+ return nfs_fs_mount_common(flags, dev_name, info, nfs_mod);
}
#if IS_ENABLED(CONFIG_NFS_V4)