From: Joonsoo Kim Date: Thu, 24 Oct 2013 01:07:37 +0000 (+0900) Subject: slab: correct pfmemalloc check X-Git-Tag: v3.13-rc1~15^2~3^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73293c2f900d0adbb6a415b312cd57976d5ae242;p=pandora-kernel.git slab: correct pfmemalloc check We checked pfmemalloc by slab unit, not page unit. You can see this in is_slab_pfmemalloc(). So other pages don't need to be set/cleared pfmemalloc. And, therefore we should check pfmemalloc in page flag of first page, but current implementation don't do that. virt_to_head_page(obj) just return 'struct page' of that object, not one of first page, since the SLAB don't use __GFP_COMP when CONFIG_MMU. To get 'struct page' of first page, we first get a slab and try to get it via virt_to_head_page(slab->s_mem). Acked-by: Andi Kleen Signed-off-by: Joonsoo Kim Signed-off-by: Pekka Enberg --- Reading git-diff-tree failed