Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153835
b: refs/heads/master
c: b88f8a5
h: refs/heads/master
i:
  153833: ebefe70
  153831: 1d9cf0b
v: v3
  • Loading branch information
Trond Myklebust authored and Linus Torvalds committed Jun 23, 2009
1 parent 56c4859 commit 8175179
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b75b35c7cad33e7613f5adf28fa10fe8b09b1c3
refs/heads/master: b88f8a546f5dba213938fdfc11e66bc5c2421623
24 changes: 24 additions & 0 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2559,6 +2559,27 @@ static struct vfsmount *nfs_do_root_mount(struct file_system_type *fs_type,
return root_mnt;
}

static void nfs_fix_devname(const struct path *path, struct vfsmount *mnt)
{
char *page = (char *) __get_free_page(GFP_KERNEL);
char *devname, *tmp;

if (page == NULL)
return;
devname = nfs_path(path->mnt->mnt_devname,
path->mnt->mnt_root, path->dentry,
page, PAGE_SIZE);
if (devname == NULL)
goto out_freepage;
tmp = kstrdup(devname, GFP_KERNEL);
if (tmp == NULL)
goto out_freepage;
kfree(mnt->mnt_devname);
mnt->mnt_devname = tmp;
out_freepage:
free_page((unsigned long)page);
}

static int nfs_follow_remote_path(struct vfsmount *root_mnt,
const char *export_path, struct vfsmount *mnt_target)
{
Expand All @@ -2585,6 +2606,9 @@ static int nfs_follow_remote_path(struct vfsmount *root_mnt,
mnt_target->mnt_sb = s;
mnt_target->mnt_root = dget(nd.path.dentry);

/* Correct the device pathname */
nfs_fix_devname(&nd.path, mnt_target);

path_put(&nd.path);
down_write(&s->s_umount);
return 0;
Expand Down

0 comments on commit 8175179

Please sign in to comment.