1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96750

View File

@ -1035,8 +1035,7 @@ udf_lookup(struct vop_cachedlookup_args *a)
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);