diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-16 05:27:27 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-16 16:27:04 -0400 |
commit | 0d5839ad05acd0fe2a84a39f33ac5efdf634a5a5 (patch) | |
tree | a84d6d3a1169a8ff4598cf1337c5e5e75863f6e2 | |
parent | 60ed8cf78f886753e454b671841c0a3a0e55e915 (diff) |
nfs: propagate devname to nfs{,4}_get_root()
step 1 of ->mnt_devname fixes: make sure we have the value of devname
available in ..._get_root().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/nfs/getroot.c | 6 | ||||
-rw-r--r-- | fs/nfs/internal.h | 6 | ||||
-rw-r--r-- | fs/nfs/super.c | 10 |
3 files changed, 13 insertions, 9 deletions
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c index b5ffe8fa291f..4d6e5a317e6d 100644 --- a/fs/nfs/getroot.c +++ b/fs/nfs/getroot.c | |||
@@ -75,7 +75,8 @@ static int nfs_superblock_set_dummy_root(struct super_block *sb, struct inode *i | |||
75 | /* | 75 | /* |
76 | * get an NFS2/NFS3 root dentry from the root filehandle | 76 | * get an NFS2/NFS3 root dentry from the root filehandle |
77 | */ | 77 | */ |
78 | struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh) | 78 | struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh, |
79 | const char *devname) | ||
79 | { | 80 | { |
80 | struct nfs_server *server = NFS_SB(sb); | 81 | struct nfs_server *server = NFS_SB(sb); |
81 | struct nfs_fsinfo fsinfo; | 82 | struct nfs_fsinfo fsinfo; |
@@ -169,7 +170,8 @@ out: | |||
169 | /* | 170 | /* |
170 | * get an NFS4 root dentry from the root filehandle | 171 | * get an NFS4 root dentry from the root filehandle |
171 | */ | 172 | */ |
172 | struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh) | 173 | struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh, |
174 | const char *devname) | ||
173 | { | 175 | { |
174 | struct nfs_server *server = NFS_SB(sb); | 176 | struct nfs_server *server = NFS_SB(sb); |
175 | struct nfs_fattr *fattr = NULL; | 177 | struct nfs_fattr *fattr = NULL; |
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index cf9fdbdabc67..9e5a003ccc53 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h | |||
@@ -254,9 +254,11 @@ extern char *nfs_path(const char *base, | |||
254 | extern struct vfsmount *nfs_d_automount(struct path *path); | 254 | extern struct vfsmount *nfs_d_automount(struct path *path); |
255 | 255 | ||
256 | /* getroot.c */ | 256 | /* getroot.c */ |
257 | extern struct dentry *nfs_get_root(struct super_block *, struct nfs_fh *); | 257 | extern struct dentry *nfs_get_root(struct super_block *, struct nfs_fh *, |
258 | const char *); | ||
258 | #ifdef CONFIG_NFS_V4 | 259 | #ifdef CONFIG_NFS_V4 |
259 | extern struct dentry *nfs4_get_root(struct super_block *, struct nfs_fh *); | 260 | extern struct dentry *nfs4_get_root(struct super_block *, struct nfs_fh *, |
261 | const char *); | ||
260 | 262 | ||
261 | extern int nfs4_get_rootfh(struct nfs_server *server, struct nfs_fh *mntfh); | 263 | extern int nfs4_get_rootfh(struct nfs_server *server, struct nfs_fh *mntfh); |
262 | #endif | 264 | #endif |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index b68c8607770f..1d81032b226a 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2336,7 +2336,7 @@ static int nfs_get_sb(struct file_system_type *fs_type, | |||
2336 | s, data ? data->fscache_uniq : NULL, NULL); | 2336 | s, data ? data->fscache_uniq : NULL, NULL); |
2337 | } | 2337 | } |
2338 | 2338 | ||
2339 | mntroot = nfs_get_root(s, mntfh); | 2339 | mntroot = nfs_get_root(s, mntfh, dev_name); |
2340 | if (IS_ERR(mntroot)) { | 2340 | if (IS_ERR(mntroot)) { |
2341 | error = PTR_ERR(mntroot); | 2341 | error = PTR_ERR(mntroot); |
2342 | goto error_splat_super; | 2342 | goto error_splat_super; |
@@ -2450,7 +2450,7 @@ nfs_xdev_mount(struct file_system_type *fs_type, int flags, | |||
2450 | nfs_fscache_get_super_cookie(s, NULL, data); | 2450 | nfs_fscache_get_super_cookie(s, NULL, data); |
2451 | } | 2451 | } |
2452 | 2452 | ||
2453 | mntroot = nfs_get_root(s, data->fh); | 2453 | mntroot = nfs_get_root(s, data->fh, dev_name); |
2454 | if (IS_ERR(mntroot)) { | 2454 | if (IS_ERR(mntroot)) { |
2455 | error = PTR_ERR(mntroot); | 2455 | error = PTR_ERR(mntroot); |
2456 | goto error_splat_super; | 2456 | goto error_splat_super; |
@@ -2718,7 +2718,7 @@ nfs4_remote_mount(struct file_system_type *fs_type, int flags, | |||
2718 | s, data ? data->fscache_uniq : NULL, NULL); | 2718 | s, data ? data->fscache_uniq : NULL, NULL); |
2719 | } | 2719 | } |
2720 | 2720 | ||
2721 | mntroot = nfs4_get_root(s, mntfh); | 2721 | mntroot = nfs4_get_root(s, mntfh, dev_name); |
2722 | if (IS_ERR(mntroot)) { | 2722 | if (IS_ERR(mntroot)) { |
2723 | error = PTR_ERR(mntroot); | 2723 | error = PTR_ERR(mntroot); |
2724 | goto error_splat_super; | 2724 | goto error_splat_super; |
@@ -3033,7 +3033,7 @@ nfs4_xdev_mount(struct file_system_type *fs_type, int flags, | |||
3033 | nfs_fscache_get_super_cookie(s, NULL, data); | 3033 | nfs_fscache_get_super_cookie(s, NULL, data); |
3034 | } | 3034 | } |
3035 | 3035 | ||
3036 | mntroot = nfs4_get_root(s, data->fh); | 3036 | mntroot = nfs4_get_root(s, data->fh, dev_name); |
3037 | if (IS_ERR(mntroot)) { | 3037 | if (IS_ERR(mntroot)) { |
3038 | error = PTR_ERR(mntroot); | 3038 | error = PTR_ERR(mntroot); |
3039 | goto error_splat_super; | 3039 | goto error_splat_super; |
@@ -3120,7 +3120,7 @@ nfs4_remote_referral_mount(struct file_system_type *fs_type, int flags, | |||
3120 | nfs_fscache_get_super_cookie(s, NULL, data); | 3120 | nfs_fscache_get_super_cookie(s, NULL, data); |
3121 | } | 3121 | } |
3122 | 3122 | ||
3123 | mntroot = nfs4_get_root(s, mntfh); | 3123 | mntroot = nfs4_get_root(s, mntfh, dev_name); |
3124 | if (IS_ERR(mntroot)) { | 3124 | if (IS_ERR(mntroot)) { |
3125 | error = PTR_ERR(mntroot); | 3125 | error = PTR_ERR(mntroot); |
3126 | goto error_splat_super; | 3126 | goto error_splat_super; |