diff options
Diffstat (limited to 'fs/nfs/nfs4namespace.c')
| -rw-r--r-- | fs/nfs/nfs4namespace.c | 12 | 
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 | */ | 
| 169 | static struct vfsmount *nfs_follow_referral(struct super_block *sb, | 168 | static 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 | */ | 
| 227 | struct vfsmount *nfs_do_refmount(struct super_block *sb, struct dentry *dentry) | 225 | struct 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); | 
| 261 | out_free: | 259 | out_free: | 
| 262 | __free_page(page); | 260 | __free_page(page); | 
| 263 | kfree(fs_locations); | 261 | kfree(fs_locations); | 
