aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2007-05-17 01:11:21 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-17 08:23:06 -0400
commitea125892a17f43919c726777ed1e4929d41e7984 (patch)
tree4d349a456bca4005d021d10c063ecb79c42ff4bc
parent8d98a690f58e0d6ecf424b7ca84488475cf87bd9 (diff)
Fix page allocation flags in grow_dev_page()
grow_dev_page() simply passes GFP_NOFS to find_or_create_page. This means the allocation of radix tree nodes is done with GFP_NOFS and the allocation of a new page is done using GFP_NOFS. The mapping has a flags field that contains the necessary allocation flags for the page cache allocation. These need to be consulted in order to get DMA and HIGHMEM allocations etc right. And yes a blockdev could be allowing Highmem allocations if its a ramdisk. Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 3deeb886f6e6..49590d590d7d 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -981,7 +981,8 @@ grow_dev_page(struct block_device *bdev, sector_t block,
981 struct page *page; 981 struct page *page;
982 struct buffer_head *bh; 982 struct buffer_head *bh;
983 983
984 page = find_or_create_page(inode->i_mapping, index, GFP_NOFS); 984 page = find_or_create_page(inode->i_mapping, index,
985 mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
985 if (!page) 986 if (!page)
986 return NULL; 987 return NULL;
987 988