• Rusty Russell's avatar
    tdb: don't suppress the transaction lock because of the allrecord lock. · 57c618f3
    Rusty Russell authored
    tdb_transaction_lock() and tdb_transaction_unlock() do nothing if we
    hold the allrecord lock.  However, the two locks don't overlap, so
    this is wrong.
    
    This simplification makes the transaction lock a straight-forward nested
    lock.
    
    There are two callers for these functions:
    1) The transaction code, which already makes sure the allrecord_lock
       isn't held.
    2) The traverse code, which wants to stop transactions whether it has the
       allrecord lock or not.  There have been deadlocks here before, however
       this should not bring them back (I hope!)
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    57c618f3
lock.c 16.9 KB