Remove a useless loop in driver-block
This is a leftover from switching from a readiness based api to async functions.
This commit is contained in:
@@ -144,11 +144,10 @@ impl<T: Disk> DiskWrapper<T> {
|
||||
if block >= size_in_blocks {
|
||||
return Err(io::Error::from_raw_os_error(syscall::EOVERFLOW));
|
||||
}
|
||||
loop {
|
||||
let bytes = self.executor.block_on(disk.read(block, block_bytes))?;
|
||||
assert_eq!(bytes, block_bytes.len());
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let bytes = self.executor.block_on(disk.read(block, block_bytes))?;
|
||||
assert_eq!(bytes, block_bytes.len());
|
||||
Ok(())
|
||||
};
|
||||
let bytes_read = block_read(self.offset, blksize, buf, read_block)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user