aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-03-16 06:32:07 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-03-16 16:48:06 -0400
commitf8ad9c4bae99854c961ca79ed130a0d11d9ab53c (patch)
treede466d67c6413ba5a0fed1733768f21e1ffc2acf /fs/nfs/nfs4namespace.c
parentb514f872f86d4b0c13fed74a1fe1f7ab500c4fd0 (diff)
nfs: nfs_do_{ref,sub}mount() superblock argument is redundant
It's always equal to dentry->d_sb Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/nfs4namespace.c')
-rw-r--r--fs/nfs/nfs4namespace.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c
index 46942e2680a0..bb80c49b6533 100644
--- a/fs/nfs/nfs4namespace.c
+++ b/fs/nfs/nfs4namespace.c
@@ -161,20 +161,18 @@ static struct vfsmount *try_location(struct nfs_clone_mount *mountdata,
161 161
162/** 162/**
163 * nfs_follow_referral - set up mountpoint when hitting a referral on moved error 163 * nfs_follow_referral - set up mountpoint when hitting a referral on moved error
164 * @sb - superblock of parent directory
165 * @dentry - parent directory 164 * @dentry - parent directory
166 * @locations - array of NFSv4 server location information 165 * @locations - array of NFSv4 server location information
167 * 166 *
168 */ 167 */
169static struct vfsmount *nfs_follow_referral(struct super_block *sb, 168static struct vfsmount *nfs_follow_referral(struct dentry *dentry,
170 struct dentry *dentry,
171 const struct nfs4_fs_locations *locations) 169 const struct nfs4_fs_locations *locations)
172{ 170{
173 struct vfsmount *mnt = ERR_PTR(-ENOENT); 171 struct vfsmount *mnt = ERR_PTR(-ENOENT);
174 struct nfs_clone_mount mountdata = { 172 struct nfs_clone_mount mountdata = {
175 .sb = sb, 173 .sb = dentry->d_sb,
176 .dentry = dentry, 174 .dentry = dentry,
177 .authflavor = NFS_SB(sb)->client->cl_auth->au_flavor, 175 .authflavor = NFS_SB(dentry->d_sb)->client->cl_auth->au_flavor,
178 }; 176 };
179 char *page = NULL, *page2 = NULL; 177 char *page = NULL, *page2 = NULL;
180 int loc, error; 178 int loc, error;
@@ -224,7 +222,7 @@ out:
224 * @dentry - dentry of referral 222 * @dentry - dentry of referral
225 * 223 *
226 */ 224 */
227struct vfsmount *nfs_do_refmount(struct super_block *sb, struct dentry *dentry) 225struct vfsmount *nfs_do_refmount(struct dentry *dentry)
228{ 226{
229 struct vfsmount *mnt = ERR_PTR(-ENOMEM); 227 struct vfsmount *mnt = ERR_PTR(-ENOMEM);
230 struct dentry *parent; 228 struct dentry *parent;
@@ -257,7 +255,7 @@ struct vfsmount *nfs_do_refmount(struct super_block *sb, struct dentry *dentry)
257 fs_locations->fs_path.ncomponents <= 0) 255 fs_locations->fs_path.ncomponents <= 0)
258 goto out_free; 256 goto out_free;
259 257
260 mnt = nfs_follow_referral(sb, dentry, fs_locations); 258 mnt = nfs_follow_referral(dentry, fs_locations);
261out_free: 259out_free:
262 __free_page(page); 260 __free_page(page);
263 kfree(fs_locations); 261 kfree(fs_locations);