Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Sep 1998 19:27:23 -0400 (EDT)
From:      Luoqi Chen <luoqi@watermarkgroup.com>
To:        Don.Lewis@tsc.tdk.com, current@FreeBSD.ORG, luoqi@watermarkgroup.com
Subject:   Re: Yet another patch to try for softupdates panic
Message-ID:  <199809212327.TAA23891@lor.watermarkgroup.com>

next in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809212327.TAA23891>