From owner-cvs-all Mon Jul 3 20:34:15 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 2BB6737B5E7; Mon, 3 Jul 2000 20:34:12 -0700 (PDT) (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA00954; Mon, 3 Jul 2000 20:34:12 -0700 (PDT) (envelope-from mckusick@FreeBSD.org) Message-Id: <200007040334.UAA00954@freefall.freebsd.org> From: Kirk McKusick Date: Mon, 3 Jul 2000 20:34:11 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/ccd ccd.c src/sys/dev/vn vn.c src/sys/kern kern_acct.c kern_ktrace.c kern_linker.c kern_sig.c link_aout.c link_elf.c vfs_syscalls.c vfs_vnops.c src/sys/sys vnode.h src/sys/ufs/ufs ufs_extattr.c ufs_quota.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG mckusick 2000/07/03 20:34:11 PDT Modified files: sys/dev/ccd ccd.c sys/dev/vn vn.c sys/kern kern_acct.c kern_ktrace.c kern_linker.c kern_sig.c link_aout.c link_elf.c vfs_syscalls.c vfs_vnops.c sys/sys vnode.h sys/ufs/ufs ufs_extattr.c ufs_quota.c Log: Move the truncation code out of vn_open and into the open system call after the acquisition of any advisory locks. This fix corrects a case in which a process tries to open a file with a non-blocking exclusive lock. Even if it fails to get the lock it would still truncate the file even though its open failed. With this change, the truncation is done only after the lock is successfully acquired. Obtained from: BSD/OS Revision Changes Path 1.81 +4 -3 src/sys/dev/ccd/ccd.c 1.115 +3 -3 src/sys/dev/vn/vn.c 1.26 +4 -3 src/sys/kern/kern_acct.c 1.38 +4 -3 src/sys/kern/kern_ktrace.c 1.48 +4 -3 src/sys/kern/kern_linker.c 1.81 +4 -3 src/sys/kern/kern_sig.c 1.30 +4 -3 src/sys/kern/link_aout.c 1.29 +4 -3 src/sys/kern/link_elf.c 1.158 +24 -14 src/sys/kern/vfs_syscalls.c 1.97 +14 -25 src/sys/kern/vfs_vnops.c 1.117 +2 -2 src/sys/sys/vnode.h 1.7 +4 -3 src/sys/ufs/ufs/ufs_extattr.c 1.33 +4 -3 src/sys/ufs/ufs/ufs_quota.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message