diff options
author | Frederic Weisbecker <[email protected]> | 2009-04-14 05:34:23 +0200 |
---|---|---|
committer | Frederic Weisbecker <[email protected]> | 2009-09-14 07:18:02 +0200 |
commit | daf88c898312a22b5385655bc6e0b064eaa2efba (patch) | |
tree | 016c432fc26c174d5aee3647e54f2aafb690dceb /net/lapb/lapb_iface.c | |
parent | a412f9efdd6424bf4bf28c8e8c92060b5e975482 (diff) |
kill-the-BKL/reiserfs: provide a tool to lock only once the write lock
Sometimes we don't want to recursively hold the per superblock write
lock because we want to be sure it is actually released when we come
to sleep.
This patch introduces the necessary tools for that.
reiserfs_write_lock_once() does the same job than reiserfs_write_lock()
except that it won't try to acquire recursively the lock if the current
task already owns it. Also the lock_depth before the call of this function
is returned.
reiserfs_write_unlock_once() unlock only if reiserfs_write_lock_once()
returned a depth equal to -1, ie: only if it actually locked.
Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: Alessio Igor Bogani <[email protected]>
Cc: Jeff Mahoney <[email protected]>
Cc: Alexander Beregalov <[email protected]>
Cc: Chris Mason <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions