diff --git a/src/backup/dynamic_index.rs b/src/backup/dynamic_index.rs index 1cc4e53b..8731a418 100644 --- a/src/backup/dynamic_index.rs +++ b/src/backup/dynamic_index.rs @@ -90,12 +90,6 @@ impl DynamicIndexReader { } pub fn new(mut file: std::fs::File) -> Result { - if let Err(err) = - nix::fcntl::flock(file.as_raw_fd(), nix::fcntl::FlockArg::LockSharedNonblock) - { - bail!("unable to get shared lock - {}", err); - } - // FIXME: This is NOT OUR job! Check the callers of this method and remove this! file.seek(SeekFrom::Start(0))?; diff --git a/src/backup/fixed_index.rs b/src/backup/fixed_index.rs index a2317f0b..eff50055 100644 --- a/src/backup/fixed_index.rs +++ b/src/backup/fixed_index.rs @@ -65,12 +65,6 @@ impl FixedIndexReader { } pub fn new(mut file: std::fs::File) -> Result { - if let Err(err) = - nix::fcntl::flock(file.as_raw_fd(), nix::fcntl::FlockArg::LockSharedNonblock) - { - bail!("unable to get shared lock - {}", err); - } - file.seek(SeekFrom::Start(0))?; let header_size = std::mem::size_of::();