Date: Tue, 10 Sep 2002 04:09:13 -0700 (PDT) From: Bruce Evans <bde@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern vfs_syscalls.c src/sys/gnu/ext2fs ext2_vnops.c src/sys/ufs/ufs ufs_vnops.c Message-ID: <200209101109.g8AB9EBh016754@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
bde 2002/09/10 04:09:13 PDT Modified files: sys/kern vfs_syscalls.c sys/gnu/ext2fs ext2_vnops.c sys/ufs/ufs ufs_vnops.c Log: vfs_syscalls.c: Changed rename(2) to follow the letter of the POSIX spec. POSIX requires rename() to have no effect if its args "resolve to the same existing file". I think "file" can only reasonably be read as referring to the inode, although the rationale and "resolve" seem to say that sameness is at the level of (resolved) directory entries. ext2fs_vnops.c, ufs_vnops.c: Replaced code that gave the historical BSD behaviour of removing one link name by checks that this code is now unreachable. This fixes some races. All vnodes needed to be unlocked for the removal, and locking at another level using something like IN_RENAME was not even attempted, so it was possible for rename(x, y) to return with both x and y removed even without any unlink(2) syscalls (one process can remove x using rename(x, y) and another process can remove y using rename(y, x)). Prodded by: alfred MFC after: 8 weeks PR: 42617 Revision Changes Path 1.69 +6 -51 src/sys/gnu/ext2fs/ext2_vnops.c 1.286 +3 -7 src/sys/kern/vfs_syscalls.c 1.205 +6 -52 src/sys/ufs/ufs/ufs_vnops.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209101109.g8AB9EBh016754>