Merge branch 'rmobile' of git://git.denx.de/u-boot-sh
[oweals/u-boot.git] / fs / ext4 / ext4_write.c
index fbc4c4b1cc1a48e2f458a0ef30df97b451d40675..e027916763f9b52937c7fe13f1698b67b94eb901 100644 (file)
@@ -23,6 +23,7 @@
 
 
 #include <common.h>
+#include <memalign.h>
 #include <linux/stat.h>
 #include <div64.h>
 #include "ext4_common.h"
@@ -986,26 +987,17 @@ int ext4_write_file(const char *filename, void *buf, loff_t offset,
                return -1;
        }
 
-       /* mount the filesystem */
-       if (!ext4fs_mount(0)) {
-               printf("** Error Bad ext4 partition **\n");
-               goto fail;
-       }
-
        ret = ext4fs_write(filename, buf, len);
-
        if (ret) {
                printf("** Error ext4fs_write() **\n");
                goto fail;
        }
-       ext4fs_close();
 
        *actwrite = len;
 
        return 0;
 
 fail:
-       ext4fs_close();
        *actwrite = 0;
 
        return -1;