]> sourceware.org Git - lvm2.git/commitdiff
Do not scan for lvm1 entries in /proc if not running 2.4 kernel.
authorMilan Broz <mbroz@redhat.com>
Wed, 10 Sep 2008 10:14:59 +0000 (10:14 +0000)
committerMilan Broz <mbroz@redhat.com>
Wed, 10 Sep 2008 10:14:59 +0000 (10:14 +0000)
(LVM1 is only present in 2.4 kernel.)

lib/locking/locking.c

index 411b4a380e68e70d067f275e5becd35a675cd9e5..f6c35d6cdc450a52fbd3be19f1aa46345e02abba 100644 (file)
@@ -292,6 +292,10 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname)
        if (is_orphan_vg(vgname))
                return 1;
 
+       /* LVM1 is only present in 2.4 kernels. */
+       if (strncmp(cmd->kernel_vsn, "2.4.", 4))
+               return 1;
+
        if (dm_snprintf(path, sizeof(path), "%s/lvm/VGs/%s", cmd->proc_dir,
                         vgname) < 0) {
                log_error("LVM1 proc VG pathname too long for %s", vgname);
This page took 0.03282 seconds and 5 git commands to generate.