aboutsummaryrefslogtreecommitdiff
path: root/src/block/resync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/resync.rs')
-rw-r--r--src/block/resync.rs14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/block/resync.rs b/src/block/resync.rs
index 2a8184b7..dab08338 100644
--- a/src/block/resync.rs
+++ b/src/block/resync.rs
@@ -282,12 +282,7 @@ impl BlockResyncManager {
}
async fn resync_block(&self, manager: &BlockManager, hash: &Hash) -> Result<(), Error> {
- let BlockStatus { exists, needed } = manager
- .mutation_lock
- .lock()
- .await
- .check_block_status(hash, manager)
- .await?;
+ let BlockStatus { exists, needed } = manager.check_block_status(hash).await?;
if exists != needed.is_needed() || exists != needed.is_nonzero() {
debug!(
@@ -370,12 +365,7 @@ impl BlockResyncManager {
who.len()
);
- manager
- .mutation_lock
- .lock()
- .await
- .delete_if_unneeded(hash, manager)
- .await?;
+ manager.delete_if_unneeded(hash).await?;
manager.rc.clear_deleted_block_rc(hash)?;
}