aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-03-16 06:26:11 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-03-16 16:47:55 -0400
commitb514f872f86d4b0c13fed74a1fe1f7ab500c4fd0 (patch)
treea54821b3e2363150e4e9b180e097a8092f884dda /fs/nfs/super.c
parentb1942c5f8cf3bea3a3c88a7498ae4c4361f31afe (diff)
nfs: make nfs_path() work without vfsmount
part 3: now we have everything to get nfs_path() just by dentry - just follow to (disconnected) root and pick the rest of the thing there. Start killing propagation of struct vfsmount * on the paths that used to bring it to nfs_path(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 1d81032b226a..a6ab483c9ad0 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2771,16 +2771,15 @@ static struct vfsmount *nfs_do_root_mount(struct file_system_type *fs_type,
2771 return root_mnt; 2771 return root_mnt;
2772} 2772}
2773 2773
2774static void nfs_fix_devname(const struct path *path, struct vfsmount *mnt) 2774static void nfs_fix_devname(struct dentry *dentry, struct vfsmount *mnt)
2775{ 2775{
2776 char *page = (char *) __get_free_page(GFP_KERNEL); 2776 char *page = (char *) __get_free_page(GFP_KERNEL);
2777 char *devname, *tmp; 2777 char *devname, *tmp;
2778 char *dummy;
2778 2779
2779 if (page == NULL) 2780 if (page == NULL)
2780 return; 2781 return;
2781 devname = nfs_path(path->mnt->mnt_devname, 2782 devname = nfs_path(&dummy, dentry, page, PAGE_SIZE);
2782 path->mnt->mnt_root, path->dentry,
2783 page, PAGE_SIZE);
2784 if (IS_ERR(devname)) 2783 if (IS_ERR(devname))
2785 goto out_freepage; 2784 goto out_freepage;
2786 tmp = kstrdup(devname, GFP_KERNEL); 2785 tmp = kstrdup(devname, GFP_KERNEL);
@@ -2894,7 +2893,7 @@ static int nfs_follow_remote_path(struct vfsmount *root_mnt,
2894 mnt_target->mnt_root = dget(nd->path.dentry); 2893 mnt_target->mnt_root = dget(nd->path.dentry);
2895 2894
2896 /* Correct the device pathname */ 2895 /* Correct the device pathname */
2897 nfs_fix_devname(&nd->path, mnt_target); 2896 nfs_fix_devname(nd->path.dentry, mnt_target);
2898 2897
2899 path_put(&nd->path); 2898 path_put(&nd->path);
2900 kfree(nd); 2899 kfree(nd);