From owner-cvs-all Tue Sep 10 4: 9:20 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8C4E37B400; Tue, 10 Sep 2002 04:09:14 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A49143E42; Tue, 10 Sep 2002 04:09:14 -0700 (PDT) (envelope-from bde@FreeBSD.org) Received: from freefall.freebsd.org (bde@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g8AB9EJU016761; Tue, 10 Sep 2002 04:09:14 -0700 (PDT) (envelope-from bde@freefall.freebsd.org) Received: (from bde@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g8AB9EBh016754; Tue, 10 Sep 2002 04:09:14 -0700 (PDT) Message-Id: <200209101109.g8AB9EBh016754@freefall.freebsd.org> From: Bruce Evans Date: Tue, 10 Sep 2002 04:09:13 -0700 (PDT) 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 X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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