If both ISDOTDOT and NOCROSSMOUNT are set then lookup() might breaks out
of the special handling for ".." and perform an ISDOTDOT VOP_LOOKUP() for a filesystem root vnode. Handle this case inside lookup(). Submitted by: tegge PR: 92785 MFC after: 1 week
This commit is contained in:
parent
80c0e5fb98
commit
b4f5200c2e
@ -520,15 +520,16 @@ dirloop:
|
||||
for (;;) {
|
||||
if (dp == ndp->ni_rootdir ||
|
||||
dp == ndp->ni_topdir ||
|
||||
dp == rootvnode) {
|
||||
dp == rootvnode ||
|
||||
((dp->v_vflag & VV_ROOT) != 0 &&
|
||||
(cnp->cn_flags & NOCROSSMOUNT) != 0)) {
|
||||
ndp->ni_dvp = dp;
|
||||
ndp->ni_vp = dp;
|
||||
vfslocked = VFS_LOCK_GIANT(dp->v_mount);
|
||||
VREF(dp);
|
||||
goto nextname;
|
||||
}
|
||||
if ((dp->v_vflag & VV_ROOT) == 0 ||
|
||||
(cnp->cn_flags & NOCROSSMOUNT))
|
||||
if ((dp->v_vflag & VV_ROOT) == 0)
|
||||
break;
|
||||
if (dp->v_iflag & VI_DOOMED) { /* forced unmount */
|
||||
error = EBADF;
|
||||
|
Loading…
x
Reference in New Issue
Block a user