mm/page-owner: use gfp_nested_mask() instead of open coded masking
[linux-2.6-block.git] / mm / page_owner.c
index 0a448d76e0af731efe259e5cc93f05cf48e7eba5..2d6360eaccbb6ee34bd3654823fa1e687a407a05 100644 (file)
@@ -168,13 +168,8 @@ static void add_stack_record_to_list(struct stack_record *stack_record,
        unsigned long flags;
        struct stack *stack;
 
-       /* Filter gfp_mask the same way stackdepot does, for consistency */
-       gfp_mask &= ~GFP_ZONEMASK;
-       gfp_mask &= (GFP_ATOMIC | GFP_KERNEL | __GFP_NOLOCKDEP);
-       gfp_mask |= __GFP_NOWARN;
-
        set_current_in_page_owner();
-       stack = kmalloc(sizeof(*stack), gfp_mask);
+       stack = kmalloc(sizeof(*stack), gfp_nested_mask(gfp_mask));
        if (!stack) {
                unset_current_in_page_owner();
                return;