1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-05 16:16:45 +03:00

cov: avoid unsing unchecked label_scan_open

Drop extra call too label_scan_open() without checking return value,
and let code go through next call bellow.
This commit is contained in:
Zdenek Kabelac 2018-11-03 17:19:33 +01:00
parent 70e3d0a613
commit d3ebb18f40

View File

@ -1299,9 +1299,7 @@ bool dev_set_bytes(struct device *dev, uint64_t start, size_t len, uint8_t val)
log_debug("Close and reopen to write %s", dev_name(dev));
bcache_invalidate_fd(scan_bcache, dev->bcache_fd);
_scan_dev_close(dev);
dev->flags |= DEV_BCACHE_WRITE;
label_scan_open(dev);
/* goes to label_scan_open() since bcache_fd < 0 */
}
if (dev->bcache_fd <= 0) {