cvs commit: src/sys/kern vfs_syscalls.c
Matthew Dillon
dillon at crater.dragonflybsd.org
Mon Aug 15 00:27:33 PDT 2005
dillon 2005/08/15 00:26:47 PDT
DragonFly src repository
Modified files:
sys/kern vfs_syscalls.c
Log:
UFS sometimes reports: 'ufs_rename: fvp == tvp (can't happen)'. The case
is not supposed to be able to happen, and UFS ignores the rename operation
when it sees it. This is true in both FreeBSD and DragonFly.
But, in fact, the case CAN happen if you rename a file to another that
happens to be a hardlink to the first. The rename operations appears to
succeed but winds up being a NOP because UFS incorrectly believes that the
case represents renaming a file to itself when it doesn't. Both files
remain in existance when the source file should have been removed.
Detect the condition and issue VOP_NREMOVE instead of VOP_NRENAME when
the source and target represent different namespaces but wind up pointing
to the same physical vnode.
Reported-by: =?ISO-8859-2?Q?Toma=BE_Bor=B9tnar?= <tomaz.borstnar at xxxxxxxx>
Revision Changes Path
1.69 +15 -3 src/sys/kern/vfs_syscalls.c
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_syscalls.c.diff?r1=1.68&r2=1.69&f=u
More information about the Commits
mailing list