init: add an init_mount helper
[sfrench/cifs-2.6.git] / init / do_mounts_initrd.c
index e08669187d63be46a190a5957f8cea4f87f83765..1f9336209ad9cccc4906ece8b392140de38ab264 100644 (file)
@@ -62,7 +62,7 @@ static int __init init_linuxrc(struct subprocess_info *info, struct cred *new)
        console_on_rootfs();
        /* move initrd over / and chdir/chroot in initrd root */
        ksys_chdir("/root");
-       do_mount(".", "/", NULL, MS_MOVE, NULL);
+       init_mount(".", "/", NULL, MS_MOVE, NULL);
        ksys_chroot(".");
        ksys_setsid();
        return 0;
@@ -99,7 +99,7 @@ static void __init handle_initrd(void)
        current->flags &= ~PF_FREEZER_SKIP;
 
        /* move initrd to rootfs' /old */
-       do_mount("..", ".", NULL, MS_MOVE, NULL);
+       init_mount("..", ".", NULL, MS_MOVE, NULL);
        /* switch root and cwd back to / of rootfs */
        ksys_chroot("..");
 
@@ -113,7 +113,7 @@ static void __init handle_initrd(void)
        mount_root();
 
        printk(KERN_NOTICE "Trying to move old root to /initrd ... ");
-       error = do_mount("/old", "/root/initrd", NULL, MS_MOVE, NULL);
+       error = init_mount("/old", "/root/initrd", NULL, MS_MOVE, NULL);
        if (!error)
                printk("okay\n");
        else {