Merge branch 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull d_path fix from Al Viro:
 "Fix d_absolute_path() regression in the last cycle (felt by tomoyo,
  mostly)"

* 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  [PATCH] fix d_absolute_path() interplay with fsmount()
This commit is contained in:
Linus Torvalds 2019-09-18 13:14:14 -07:00
commit b30d87cf96
1 changed files with 4 additions and 2 deletions

View File

@ -116,8 +116,10 @@ static int prepend_path(const struct path *path,
vfsmnt = &mnt->mnt; vfsmnt = &mnt->mnt;
continue; continue;
} }
if (!error) if (is_mounted(vfsmnt) && !is_anon_ns(mnt->mnt_ns))
error = is_mounted(vfsmnt) ? 1 : 2; error = 1; // absolute root
else
error = 2; // detached or not attached yet
break; break;
} }
parent = dentry->d_parent; parent = dentry->d_parent;