Merge branch 'fix/hda' into for-linus
[safe/jmp/linux-2.6] / fs / mpage.c
index 680ba60..fd56ca2 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/kdev_t.h>
+#include <linux/gfp.h>
 #include <linux/bio.h>
 #include <linux/fs.h>
 #include <linux/buffer_head.h>
@@ -379,7 +380,8 @@ mpage_readpages(struct address_space *mapping, struct list_head *pages,
        struct buffer_head map_bh;
        unsigned long first_logical_block = 0;
 
-       clear_buffer_mapped(&map_bh);
+       map_bh.b_state = 0;
+       map_bh.b_size = 0;
        for (page_idx = 0; page_idx < nr_pages; page_idx++) {
                struct page *page = list_entry(pages->prev, struct page, lru);
 
@@ -412,7 +414,8 @@ int mpage_readpage(struct page *page, get_block_t get_block)
        struct buffer_head map_bh;
        unsigned long first_logical_block = 0;
 
-       clear_buffer_mapped(&map_bh);
+       map_bh.b_state = 0;
+       map_bh.b_size = 0;
        bio = do_mpage_readpage(bio, page, 1, &last_block_in_bio,
                        &map_bh, &first_logical_block, get_block);
        if (bio)
@@ -559,7 +562,7 @@ page_is_mapped:
        if (page->index >= end_index) {
                /*
                 * The page straddles i_size.  It must be zeroed out on each
-                * and every writepage invokation because it may be mmapped.
+                * and every writepage invocation because it may be mmapped.
                 * "A file is mapped in multiples of the page size.  For a file
                 * that is not a multiple of the page size, the remaining memory
                 * is zeroed when mapped, and writes to that region are not