From owner-freebsd-current Mon Sep 21 16:29:27 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA11708 for freebsd-current-outgoing; Mon, 21 Sep 1998 16:29:27 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA11511 for ; Mon, 21 Sep 1998 16:28:33 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id TAA23891; Mon, 21 Sep 1998 19:27:23 -0400 (EDT) (envelope-from luoqi) Date: Mon, 21 Sep 1998 19:27:23 -0400 (EDT) From: Luoqi Chen Message-Id: <199809212327.TAA23891@lor.watermarkgroup.com> To: Don.Lewis@tsc.tdk.com, current@FreeBSD.ORG, luoqi@watermarkgroup.com Subject: Re: Yet another patch to try for softupdates panic Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > It looks like this bogus unlocking could also affect vinvalbuf() which > expects the vnode to be locked. > The unlock is not bogus at all. You have to maintain a strict locking order to avoid deadlocks. For vnodes, this locking order is the directory tree itself, i.e., you have to lock the parent first, then the child. So if you hold the lock on the child and intend to lock the parent, you have to release the lock on child first, then acquire the lock on the parent, and then reacquire lock the the child. That's also the reason why you can't have hardlinks to a directory. -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message