]> sourceware.org Git - lvm2.git/commitdiff
cov: avoid unsing unchecked label_scan_open
authorZdenek Kabelac <zkabelac@redhat.com>
Sat, 3 Nov 2018 16:19:33 +0000 (17:19 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 5 Nov 2018 16:25:11 +0000 (17:25 +0100)
Drop extra call too label_scan_open() without checking return value,
and let code go through next call bellow.

lib/label/label.c

index ca8502d416f9eb662086936614e81d70b7a64f2f..538716130c82bf8214dcf702b4cc6b0bd1f2d7bc 100644 (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) {
This page took 0.040377 seconds and 5 git commands to generate.