locks: clarify posix_locks_deadlock
authorJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 26 Oct 2007 22:05:40 +0000 (18:05 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Sun, 3 Feb 2008 22:51:36 +0000 (17:51 -0500)
commitb533184fc353d4a2d07929b4ac424a6f1bf5a3b9
tree502634d5810735bcaea8666bdadf9bc0b6abc216
parent9135f1901ee6449dfe338adf6e40e9c2025b8150
locks: clarify posix_locks_deadlock

For such a short function (with such a long comment),
posix_locks_deadlock() seems to cause a lot of confusion.  Attempt to
make it a bit clearer:

- Remove the initial posix_same_owner() check, which can never
  pass (since this is only called in the case that block_fl and
  caller_fl conflict)
- Use an explicit loop (and a helper function) instead of a goto.
- Rewrite the comment, attempting a clearer explanation, and
  removing some uninteresting historical detail.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/locks.c