include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / hfs / bnode.c
index 1e44dcfe49c4971315fd39d3d33772b0dfbd8a9c..cdb41a1f6a646bd957fdfa2cf2b835d2078d9731 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <linux/pagemap.h>
+#include <linux/slab.h>
 #include <linux/swap.h>
 
 #include "btree.h"
@@ -249,10 +250,9 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
        sb = tree->inode->i_sb;
        size = sizeof(struct hfs_bnode) + tree->pages_per_bnode *
                sizeof(struct page *);
-       node = kmalloc(size, GFP_KERNEL);
+       node = kzalloc(size, GFP_KERNEL);
        if (!node)
                return NULL;
-       memset(node, 0, size);
        node->tree = tree;
        node->this = cnid;
        set_bit(HFS_BNODE_NEW, &node->flags);
@@ -280,7 +280,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
        block = off >> PAGE_CACHE_SHIFT;
        node->page_offset = off & ~PAGE_CACHE_MASK;
        for (i = 0; i < tree->pages_per_bnode; i++) {
-               page = read_cache_page(mapping, block++, (filler_t *)mapping->a_ops->readpage, NULL);
+               page = read_mapping_page(mapping, block++, NULL);
                if (IS_ERR(page))
                        goto fail;
                if (PageError(page)) {