X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=fs%2Fd_path.c;h=0f1fc1743302f329eb1b6ce7066237410ed6cc07;hb=cee853e825a9ab64b54bd53f991e98f832c47317;hp=a7d0a96b35ce5ebf47dec83bce25d531e9943af4;hpb=1902314157b19754e0ff25b44527654847cfd127;p=linux.git diff --git a/fs/d_path.c b/fs/d_path.c index a7d0a96b35ce..0f1fc1743302 100644 --- a/fs/d_path.c +++ b/fs/d_path.c @@ -116,8 +116,10 @@ static int prepend_path(const struct path *path, 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;