In VOP_LOOKUP, don't assume that the final pathname component

will be in the same filesystem than the one where the current
component is.

Approved by:	scottl
This commit is contained in:
Maxime Henrion 2002-05-16 19:22:39 +00:00
parent 9504abaad7
commit fc6f338fd2

View File

@ -1035,8 +1035,7 @@ lookloop:
if (flags & MAKEENTRY)
cache_enter(dvp, *vpp, a->a_cnp);
/* Why wait to the very end to decide that this is a read-only fs? */
if (nameiop == CREATE || nameiop == RENAME)
if ((flags & ISLASTCN) && (nameiop == CREATE || nameiop == RENAME))
return (EROFS);
return (ENOENT);