Subject: CVS commit: src/sys
To: None <>
From: Charles M. Hannum <>
List: source-changes
Date: 03/05/2003 20:28:24
Module Name:	src
Committed By:	mycroft
Date:		Wed Mar  5 18:28:23 UTC 2003

Modified Files:
	src/sys/kern: vfs_lockf.c
	src/sys/sys: lockf.h

Log Message:

We cannot store LWP pointers permanently in lock structures, for two reasons:
1) They are somewhat ephemeral.  Dangling pointers are bad.
2) A different LWP may issue the unlock, and in this case, we were not actually
   doing the unlock at all.  This was causing processes to exit without undoing
   fcntl(2) locks.  Furthermore, the locks are process-specific to begin with,
   so the test was just plain wrong.

Instead, we go back to storing a proc pointer for POSIX locks.  In addition, we
add an extra pointer to the LWP, which is used in deadlock detection.  After
the lock is granted, this pointer is 0ed and there is no reference to the LWP.

Now evolution can inc my mail again.

To generate a diff of this commit:
cvs rdiff -r1.22 -r1.23 src/sys/kern/vfs_lockf.c
cvs rdiff -r1.10 -r1.11 src/sys/sys/lockf.h

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