TLReplaceDisks: Move assertion checking locks
Commit 1bee66f3 added assertions for ensuring only the necessary locks are kept while replacing disks. One of them makes sure locks have been released during the operation. Unfortunately the commit added the check as part of a “finally” branch, which is also run when an exception is thrown (in which case the locks may not have been released yet). Errors could be masked by the assertion error. Moving the check out of the “finally” branch fixes the issue. Signed-off-by:Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
Loading
Please register or sign in to comment