1
0
Fork 0

[PATCH] fix d_absolute_path() interplay with fsmount()

stuff in anon namespace should be treated as unattached.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
alistair/sunxi64-5.4-dsi
Al Viro 2019-08-30 19:31:09 -04:00
parent 5f9e832c13
commit f2683bd8d5
1 changed files with 4 additions and 2 deletions

View File

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