vfs: spread struct mount - mnt_has_parent

Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2011-11-24 21:47:05 -05:00
commit 676da58df7
3 changed files with 13 additions and 12 deletions

View file

@ -2460,8 +2460,9 @@ static int prepend_path(const struct path *path,
struct dentry * parent;
if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
struct mount *mnt = real_mount(vfsmnt);
/* Global root? */
if (!mnt_has_parent(vfsmnt))
if (!mnt_has_parent(mnt))
goto global_root;
dentry = vfsmnt->mnt_mountpoint;
vfsmnt = vfsmnt->mnt_parent;