mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-22 06:50:52 +03:00
cov: check result of dev_get_block_size
This commit is contained in:
parent
862899cc88
commit
82e7426028
@ -1498,7 +1498,10 @@ void dev_set_last_byte(struct device *dev, uint64_t offset)
|
||||
unsigned int phys_block_size = 0;
|
||||
unsigned int block_size = 0;
|
||||
|
||||
dev_get_block_size(dev, &phys_block_size, &block_size);
|
||||
if (!dev_get_block_size(dev, &phys_block_size, &block_size)) {
|
||||
stack;
|
||||
return; /* FIXME: error path ? */
|
||||
}
|
||||
|
||||
bcache_set_last_byte(scan_bcache, dev->bcache_fd, offset, phys_block_size);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user