Subject: CVS commit: [netbsd-3] src/sys/ufs/lfs
To: None <>
From: Matthias Scheler <>
List: source-changes
Date: 03/30/2005 10:12:11
Module Name:	src
Committed By:	tron
Date:		Wed Mar 30 10:12:11 UTC 2005

Modified Files:
	src/sys/ufs/lfs [netbsd-3]: lfs_alloc.c

Log Message:
Pull up revision 1.77 (requested by perseant in ticket #74):
Make LFS dirops get their vnode first, before incrementing the dirop
count, to prevent a deadlock trying to call VOP_PUTPAGES() on a VDIROP
vnode. This can happen when a stacked filesystem is mounted on top of an
LFS: an LFS dirop needs to get a vnode, which is available from the upper
layer. The corresponding lower layer vnode, however, is VDIROP, so the
upper layer can't be cleaned out since its VOP_PUTPAGES() is passed
through to the lower layer, which waits for dirops to drain before it can
proceed.  Deadlock.
Tweak ufs_makeinode() and ufs_mkdir() to pass the a_vpp argument through
Partially addresses PR # 26043, though it probably does not completely fix
the problem described there.

To generate a diff of this commit:
cvs rdiff -r1.76 -r1.76.2.1 src/sys/ufs/lfs/lfs_alloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.