Fix three bugs in the last commit and document special cases. Tighten
commite95b513d3185e47b5d7370516fb349e6d77df046
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 11 May 2006 19:50:29 +0000 (11 19:50 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 11 May 2006 19:50:29 +0000 (11 19:50 +0000)
tree1df62dbe0bcede3d2ac6755a5d7fd2c314d4e924
parent3a473633e6b68b5b583c7ef118176c5a4635b384
Fix three bugs in the last commit and document special cases.  Tighten
up the count calculation.   The code now passes the /usr/src/test/lockf
system test.

* F_UNLCK wasn't being handled properly in certain cases, resulting in a
  panic.

* The 'next' pointer was not bring properly adjusted when removing an
  element (brange) other then the current element in the scan, resulting
  in a posix lock error.

* The first and last matches were not always being properly merged with
  the created range, resulting in a positive count panic.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
sys/kern/kern_lockf.c