aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/namespace.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/namespace.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/namespace.c')
-rw-r--r--fs/nfs/namespace.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index 859cdaba4c1..c0b8344db0c 100644
--- a/fs/nfs/namespace.c
+++ b/fs/nfs/namespace.c
@@ -25,8 +25,7 @@ static LIST_HEAD(nfs_automount_list);
static DECLARE_DELAYED_WORK(nfs_automount_task, nfs_expire_automounts);
int nfs_mountpoint_expiry_timeout = 500 * HZ;
-static struct vfsmount *nfs_do_submount(struct super_block *sb,
- struct dentry *dentry,
+static struct vfsmount *nfs_do_submount(struct dentry *dentry,
struct nfs_fh *fh,
struct nfs_fattr *fattr);
@@ -164,9 +163,9 @@ struct vfsmount *nfs_d_automount(struct path *path)
}
if (fattr->valid & NFS_ATTR_FATTR_V4_REFERRAL)
- mnt = nfs_do_refmount(path->mnt->mnt_sb, path->dentry);
+ mnt = nfs_do_refmount(path->dentry);
else
- mnt = nfs_do_submount(path->mnt->mnt_sb, path->dentry, fh, fattr);
+ mnt = nfs_do_submount(path->dentry, fh, fattr);
if (IS_ERR(mnt))
goto out;
@@ -230,19 +229,17 @@ static struct vfsmount *nfs_do_clone_mount(struct nfs_server *server,
/**
* nfs_do_submount - set up mountpoint when crossing a filesystem boundary
- * @sb - superblock of parent directory
* @dentry - parent directory
* @fh - filehandle for new root dentry
* @fattr - attributes for new root inode
*
*/
-static struct vfsmount *nfs_do_submount(struct super_block *sb,
- struct dentry *dentry,
+static struct vfsmount *nfs_do_submount(struct dentry *dentry,
struct nfs_fh *fh,
struct nfs_fattr *fattr)
{
struct nfs_clone_mount mountdata = {
- .sb = sb,
+ .sb = dentry->d_sb,
.dentry = dentry,
.fh = fh,
.fattr = fattr,
@@ -262,7 +259,7 @@ static struct vfsmount *nfs_do_submount(struct super_block *sb,
mnt = (struct vfsmount *)devname;
if (IS_ERR(devname))
goto free_page;
- mnt = nfs_do_clone_mount(NFS_SB(sb), devname, &mountdata);
+ mnt = nfs_do_clone_mount(NFS_SB(dentry->d_sb), devname, &mountdata);
free_page:
free_page((unsigned long)page);
out: