]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit760c5f1b1ddcd51225170e62c81434ab190e8dec
tree502634d5810735bcaea8666bdadf9bc0b6abc216
parent6559cd4f271e32dc078c3ffba20df21c922b0ad1
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