Btrfs: Avoid using __GFP_HIGHMEM with slab allocator
authorYan Zheng <zheng.yan@oracle.com>
Thu, 12 Feb 2009 15:06:04 +0000 (10:06 -0500)
committerChris Mason <chris.mason@oracle.com>
Thu, 12 Feb 2009 15:06:04 +0000 (10:06 -0500)
btrfs_releasepage may call kmem_cache_alloc indirectly,
and provide same GFP flags it gets to kmem_cache_alloc.
So it's possible to use __GFP_HIGHMEM with the slab
allocator.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
fs/btrfs/inode.c

index 8f07062..638bcb5 100644 (file)
@@ -4263,7 +4263,7 @@ static int btrfs_releasepage(struct page *page, gfp_t gfp_flags)
 {
        if (PageWriteback(page) || PageDirty(page))
                return 0;
-       return __btrfs_releasepage(page, gfp_flags);
+       return __btrfs_releasepage(page, gfp_flags & GFP_NOFS);
 }
 
 static void btrfs_invalidatepage(struct page *page, unsigned long offset)