]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - fs/ubifs/ubifs.c
mtd/nand/ubi: assortment of alignment fixes
[karo-tx-uboot.git] / fs / ubifs / ubifs.c
index 6dd617426ad35dfdb28da648db8361f6e00a7c02..4daa7fad53df51acffcc7d58199181412e05b6d6 100644 (file)
@@ -108,7 +108,7 @@ static inline struct crypto_comp *crypto_alloc_comp(const char *alg_name,
        struct crypto_comp *ptr;
        int i = 0;
 
-       ptr = malloc(sizeof(struct crypto_comp));
+       ptr = malloc_cache_aligned(sizeof(struct crypto_comp));
        while (i < UBIFS_COMPR_TYPES_CNT) {
                comp = ubifs_compressors[i];
                if (!comp) {
@@ -723,7 +723,7 @@ static int do_readpage(struct ubifs_info *c, struct inode *inode,
                                 * destination area to a multiple of
                                 * UBIFS_BLOCK_SIZE.
                                 */
-                               buff = malloc(UBIFS_BLOCK_SIZE);
+                               buff = malloc_cache_aligned(UBIFS_BLOCK_SIZE);
                                if (!buff) {
                                        printf("%s: Error, malloc fails!\n",
                                               __func__);