Skip to content

Commit f14a324

Browse files
committed
f reswap insertion order
1 parent 3ceeb22 commit f14a324

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/debug_sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ impl LockMetadata {
193193
// Since a try-lock will simply fail if the lock is held already, we do not
194194
// consider try-locks to ever generate lockorder inversions. However, if a try-lock
195195
// succeeds, we do consider it to have created lockorder dependencies.
196-
held.borrow_mut().insert(Arc::clone(this));
197196
let mut locked_before = this.locked_before.lock().unwrap();
198197
for locked in held.borrow().iter() {
199198
let mut lockdep = LockDep::new_without_bt(locked);
@@ -202,6 +201,7 @@ impl LockMetadata {
202201
locked_before.insert(lockdep);
203202
}
204203
}
204+
held.borrow_mut().insert(Arc::clone(this));
205205
});
206206
}
207207
}

0 commit comments

Comments
 (0)