aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/mballoc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r--fs/ext4/mballoc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 0c7e247f714c..fd2294de404c 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -846,6 +846,8 @@ static int ext4_mb_init_cache(struct page *page, char *incore)
846 846
847 err = 0; 847 err = 0;
848 first_block = page->index * blocks_per_page; 848 first_block = page->index * blocks_per_page;
849 /* init the page */
850 memset(page_address(page), 0xff, PAGE_CACHE_SIZE);
849 for (i = 0; i < blocks_per_page; i++) { 851 for (i = 0; i < blocks_per_page; i++) {
850 int group; 852 int group;
851 struct ext4_group_info *grinfo; 853 struct ext4_group_info *grinfo;
@@ -872,7 +874,6 @@ static int ext4_mb_init_cache(struct page *page, char *incore)
872 BUG_ON(incore == NULL); 874 BUG_ON(incore == NULL);
873 mb_debug("put buddy for group %u in page %lu/%x\n", 875 mb_debug("put buddy for group %u in page %lu/%x\n",
874 group, page->index, i * blocksize); 876 group, page->index, i * blocksize);
875 memset(data, 0xff, blocksize);
876 grinfo = ext4_get_group_info(sb, group); 877 grinfo = ext4_get_group_info(sb, group);
877 grinfo->bb_fragments = 0; 878 grinfo->bb_fragments = 0;
878 memset(grinfo->bb_counters, 0, 879 memset(grinfo->bb_counters, 0,