aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-07-30 16:05:17 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-07-30 19:04:45 -0400
commite8f25e6d6d198dca7d09d8fe2c24ba3b9683bb24 (patch)
treecabdb43bbc11b40fd95e7e2742bc8a64b76241cb /fs/nfs/super.c
parentab7017a3a0a64b953e091619c30413b3721d925d (diff)
NFS: Remove the NFS v4 xdev mount function
I can now share this code with the v2 and v3 code by using the NFS subversion structure. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 61405a7a6b3..4faefa19a8c 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2445,10 +2445,15 @@ void nfs_kill_super(struct super_block *s)
2445 * Clone an NFS2/3/4 server record on xdev traversal (FSID-change) 2445 * Clone an NFS2/3/4 server record on xdev traversal (FSID-change)
2446 */ 2446 */
2447struct dentry * 2447struct dentry *
2448nfs_xdev_mount_common(struct file_system_type *fs_type, int flags, 2448nfs_xdev_mount(struct file_system_type *fs_type, int flags,
2449 const char *dev_name, struct nfs_mount_info *mount_info) 2449 const char *dev_name, void *raw_data)
2450{ 2450{
2451 struct nfs_clone_mount *data = mount_info->cloned; 2451 struct nfs_clone_mount *data = raw_data;
2452 struct nfs_mount_info mount_info = {
2453 .fill_super = nfs_clone_super,
2454 .set_security = nfs_clone_sb_security,
2455 .cloned = data,
2456 };
2452 struct nfs_server *server; 2457 struct nfs_server *server;
2453 struct dentry *mntroot = ERR_PTR(-ENOMEM); 2458 struct dentry *mntroot = ERR_PTR(-ENOMEM);
2454 struct nfs_subversion *nfs_mod = NFS_SB(data->sb)->nfs_client->cl_nfs_mod; 2459 struct nfs_subversion *nfs_mod = NFS_SB(data->sb)->nfs_client->cl_nfs_mod;
@@ -2456,7 +2461,7 @@ nfs_xdev_mount_common(struct file_system_type *fs_type, int flags,
2456 2461
2457 dprintk("--> nfs_xdev_mount_common()\n"); 2462 dprintk("--> nfs_xdev_mount_common()\n");
2458 2463
2459 mount_info->mntfh = data->fh; 2464 mount_info.mntfh = mount_info.cloned->fh;
2460 2465
2461 /* create a new volume representation */ 2466 /* create a new volume representation */
2462 server = nfs_clone_server(NFS_SB(data->sb), data->fh, data->fattr, data->authflavor); 2467 server = nfs_clone_server(NFS_SB(data->sb), data->fh, data->fattr, data->authflavor);
@@ -2465,7 +2470,7 @@ nfs_xdev_mount_common(struct file_system_type *fs_type, int flags,
2465 goto out_err; 2470 goto out_err;
2466 } 2471 }
2467 2472
2468 mntroot = nfs_fs_mount_common(server, flags, dev_name, mount_info, nfs_mod); 2473 mntroot = nfs_fs_mount_common(server, flags, dev_name, &mount_info, nfs_mod);
2469 dprintk("<-- nfs_xdev_mount_common() = 0\n"); 2474 dprintk("<-- nfs_xdev_mount_common() = 0\n");
2470out: 2475out:
2471 return mntroot; 2476 return mntroot;
@@ -2475,21 +2480,6 @@ out_err:
2475 goto out; 2480 goto out;
2476} 2481}
2477 2482
2478/*
2479 * Clone an NFS2/3 server record on xdev traversal (FSID-change)
2480 */
2481static struct dentry *
2482nfs_xdev_mount(struct file_system_type *fs_type, int flags,
2483 const char *dev_name, void *raw_data)
2484{
2485 struct nfs_mount_info mount_info = {
2486 .fill_super = nfs_clone_super,
2487 .set_security = nfs_clone_sb_security,
2488 .cloned = raw_data,
2489 };
2490 return nfs_xdev_mount_common(&nfs_fs_type, flags, dev_name, &mount_info);
2491}
2492
2493#ifdef CONFIG_NFS_V4 2483#ifdef CONFIG_NFS_V4
2494 2484
2495static void nfs4_validate_mount_flags(struct nfs_parsed_mount_data *args) 2485static void nfs4_validate_mount_flags(struct nfs_parsed_mount_data *args)