From: Zdenek Kabelac Date: Sat, 3 Nov 2018 16:19:33 +0000 (+0100) Subject: cov: avoid unsing unchecked label_scan_open X-Git-Tag: v2_03_03~376 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=d3ebb18f4052fd90bb2d177089e79801b51f6242;p=lvm2.git 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. --- diff --git a/lib/label/label.c b/lib/label/label.c index ca8502d41..538716130 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -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) {