mem-controller gfp-mask fix
authorBadari Pulavarty <pbadari@gmail.com>
Thu, 7 Feb 2008 08:14:05 +0000 (00:14 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 7 Feb 2008 16:42:19 +0000 (08:42 -0800)
Need to strip __GFP_HIGHMEM flag while passing to mem_container_cache_charge().

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/filemap.c

index 35867ab72640ad17646f123b3d100aa11dbd487d..5357fcc4643b5a653c82d849690ababaeaec9a0e 100644 (file)
@@ -460,7 +460,8 @@ int filemap_write_and_wait_range(struct address_space *mapping,
 int add_to_page_cache(struct page *page, struct address_space *mapping,
                pgoff_t offset, gfp_t gfp_mask)
 {
-       int error = mem_cgroup_cache_charge(page, current->mm, gfp_mask);
+       int error = mem_cgroup_cache_charge(page, current->mm,
+                                       gfp_mask & ~__GFP_HIGHMEM);
        if (error)
                goto out;