diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-12-10 13:30:55 +0100 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2020-01-15 16:15:16 +0100 |
commit | 250d69f6a465e36a6ab8602030267de2586e028f (patch) | |
tree | 8edaae969ee3936dee2cc262ded26112dd08b320 /fs/nfs/super.c | |
parent | nfs4: fold nfs_do_root_mount/nfs_follow_remote_path (diff) | |
download | linux-250d69f6a465e36a6ab8602030267de2586e028f.tar.xz linux-250d69f6a465e36a6ab8602030267de2586e028f.zip |
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.c | 25 |
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) |