Commit b335b003 authored by Yan Zheng's avatar Yan Zheng Committed by Chris Mason

Btrfs: Avoid using __GFP_HIGHMEM with slab allocator

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: default avatarYan Zheng <zheng.yan@oracle.com>
parent e1df36d2
...@@ -4263,7 +4263,7 @@ static int btrfs_releasepage(struct page *page, gfp_t gfp_flags) ...@@ -4263,7 +4263,7 @@ static int btrfs_releasepage(struct page *page, gfp_t gfp_flags)
{ {
if (PageWriteback(page) || PageDirty(page)) if (PageWriteback(page) || PageDirty(page))
return 0; 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) static void btrfs_invalidatepage(struct page *page, unsigned long offset)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment