From owner-cvs-sys Mon Apr 28 19:08:13 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id TAA15545 for cvs-sys-outgoing; Mon, 28 Apr 1997 19:08:13 -0700 (PDT) Received: from freefall.freebsd.org (freefall.cdrom.com [204.216.27.21]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA15344; Mon, 28 Apr 1997 19:06:09 -0700 (PDT) From: KATO Takenori Received: (from kato@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA02655; Mon, 28 Apr 1997 19:06:08 -0700 (PDT) Date: Mon, 28 Apr 1997 19:06:08 -0700 (PDT) Message-Id: <199704290206.TAA02655@freefall.freebsd.org> To: CVS-committers@FreeBSD.org, cvs-all@FreeBSD.org, cvs-sys@FreeBSD.org Subject: cvs commit: src/sys/miscfs/union union_vnops.c Sender: owner-cvs-sys@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk kato 97/04/28 19:06:08 Modified: sys/miscfs/union union_vnops.c Log: Revised fix for locking violation when unionfs calls vput with UN_KLOCK flag. When UN_KLOCK is set, VOP_UNLOCK should keep uppervp locked and clear UN_ULOCK flag. To do this, when UN_KLOCK is set, (1) union_unlock clears UN_ULOCK and does not clear UN_KLOCK, (2) union_lock() does not access uppervp and does not clear UN_KLOCK, and (3) callers of vput/VOP_UNLOCK should clear UN_KLOCK. For example, vput becomes: SETKLOCK(union_node); vput(vnode); CLEARKLOCK(union_node); where SETKLOCK macro sets UN_KLOCK and CLEARKLOCK macro clears UN_KLOCK. Revision Changes Path 1.31 +36 -32 src/sys/miscfs/union/union_vnops.c