aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <[email protected]>2009-04-14 05:34:24 +0200
committerFrederic Weisbecker <[email protected]>2009-09-14 07:18:03 +0200
commit22c963addcf426bef97a43f6e601f985f8082ed5 (patch)
treef71ae95fd1eee899c446ebb03a3cc02fe24daf3c /net/lapb/lapb_iface.c
parentdaf88c898312a22b5385655bc6e0b064eaa2efba (diff)
kill-the-BKL/reiserfs: lock only once in reiserfs_truncate_file
Impact: fix a deadlock reiserfs_truncate_file() can be called from multiple context where the write lock can be already hold or not. This function also acquire (possibly recursively) the write lock. Subsequent releases before sleeping will not actually release the lock because we may be in more than one lock depth degree. A typical case is: reiserfs_file_release { acquire_the_lock() reiserfs_truncate_file() reacquire_the_lock() journal_begin() { do_journal_begin_r() { reiserfs_wait_on_write_block() { /* * Not released because still one * depth owned */ release_lock() wait_for_event() At this stage the event never happen because the one which provides it needs the write lock. We use reiserfs_write_lock_once() here to ensure that we don't acquire the write lock recursively. 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