Subject: Re: CVS commit: src/sys/miscfs
To: None <>
From: YAMAMOTO Takashi <>
List: tech-kern
Date: 06/13/2004 03:16:47
[moved from source-changes@]


> I don't think the following test is needed:
>               if (tvp->v_mount != fdvp->v_mount)
>                       tvp = NULL;
>               else
>                       vref(tvp);
> as VOP_RENAME() is not intended to support cross-mount renames; any call 
> that ever did that would be an error.
> My only concern with leaving the test in is that it might imply to some 
> future programmers that they need to worry about a cross-mount rename.

i'm not sure if or not our VOP i/f is intended to support cross-mount ops.
(yes, i'm one of confused "future programmers". :-)
if it isn't as you say, it's better to remove the checks in
all filesystem implementations and have the upper layer check it instead.
removing checks only in layered filesystems confuse
"future programmers" more badly, IMO.

and, actually, we're currently allowing cross-mount renames in
some cases and the check is needed (and might be insufficient).
eg. when you attempt to move files from nullfs to its underlying