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>
This commit is contained in:
@@ -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;
|
||||
struct nfs_mount_info *info = raw_data;
|
||||
struct nfs_subversion *nfs_mod = NFS_SB(info->cloned->sb)->nfs_client->cl_nfs_mod;
|
||||
|
||||
dprintk("--> nfs_xdev_mount()\n");
|
||||
|
||||
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)
|
||||
|
Reference in New Issue
Block a user