1. 03 Feb, 2008 2 commits
    • Matthew Wilcox's avatar
      file locks: Use wait_event_interruptible_timeout() · 4321e01e
      Matthew Wilcox authored
      interruptible_sleep_on_locked() is just an open-coded
      wait_event_interruptible_timeout(), with the one difference that
      interruptible_sleep_on_locked() doesn't bother to check the condition on
      which it is waiting, depending instead on the BKL to avoid the case
      where it blocks after the wakeup has already been called.
      
      locks_block_on_timeout() is only used in one place, so it's actually
      simpler to inline it into its caller.
      Signed-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      4321e01e
    • J. Bruce Fields's avatar
      locks: clarify posix_locks_deadlock · b533184f
      J. Bruce Fields authored
      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: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      b533184f
  2. 02 Feb, 2008 38 commits