Subject: CVS commit: [netbsd-3] src/sys
To: None <source-changes@NetBSD.org>
From: Manuel Bouyer <bouyer@netbsd.org>
List: source-changes
Date: 08/26/2007 18:44:18
Module Name: src
Committed By: bouyer
Date: Sun Aug 26 18:44:18 UTC 2007
Modified Files:
src/sys/kern [netbsd-3]: vfs_subr.c
src/sys/sys [netbsd-3]: lock.h
Log Message:
Pull up following revision(s) (requested by pooka in ticket #1816):
sys/sys/lock.h: revision 1.72
sys/kern/kern_lock.c: revision 1.118
sys/kern/vfs_subr.c: revision 1.295
Define a new lockmgr flag LK_RESURRECT which can be used in
conjunction with LK_DRAIN. This has the same effect as LK_DRAIN
except it atomically does NOT mark the lock as drained. This
guarantees that when we got the lock, we were the last one currently
waiting for the lock.
Use LK_DRAIN|LK_RESURRECT in vclean() to make sure there are no
waiters for the lock. This should fix behaviour theoretized to be
caused by vfs_subr.c 1.289 which caused vclean() to run into
completion and free the vnode before all lock-waiters had been
processed. Should therefore fix the "simple_lock: unitialized lock"
problems seen recently.
thanks to Juergen Hannken-Illjes for some analysis of the problem
and Erik Bertelsen for testing
To generate a diff of this commit:
cvs rdiff -r1.243.2.6 -r1.243.2.7 src/sys/kern/vfs_subr.c
cvs rdiff -r1.58 -r1.58.2.1 src/sys/sys/lock.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.