overlay: call volume_init() before mount
[project/fstools.git] / libfstools / overlay.c
index c5356931cceb4007a62164caca60b88b838585a8..7c9b480ba963818a70c30048ce4e1a1a181a2793 100644 (file)
@@ -255,14 +255,14 @@ static int overlay_mount_fs(struct volume *v)
                break;
        }
 
+       volume_init(v);
+
        if (mount(v->blk, "/tmp/overlay", fstype, MS_NOATIME, NULL)) {
                ULOG_ERR("failed to mount -t %s %s /tmp/overlay: %s\n",
                         fstype, v->blk, strerror(errno));
                return -1;
        }
 
-       volume_init(v);
-
        return -1;
 }