overlay: call volume_init() before mount
authorFelix Fietkau <nbd@openwrt.org>
Sun, 22 Mar 2015 13:11:39 +0000 (14:11 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 22 Mar 2015 13:11:39 +0000 (14:11 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
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;
 }