Skip to content
Snippets Groups Projects
Commit 0f352e53 authored by Michal Hocko's avatar Michal Hocko Committed by Linus Torvalds
Browse files

mm: remove __GFP_NOFAIL is deprecated comment


Commit 64775719 ("mm: clarify __GFP_NOFAIL deprecation status") was
incomplete and didn't remove the comment about __GFP_NOFAIL being
deprecated in buffered_rmqueue.

Let's get rid of this leftover but keep the WARN_ON_ONCE for order > 1
because we should really discourage from using __GFP_NOFAIL with higher
order allocations because those are just too subtle.

Signed-off-by: default avatarMichal Hocko <mhocko@suse.com>
Reviewed-by: default avatarNikolay Borisov <kernel@kyup.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 95813b8f
No related branches found
No related tags found
No related merge requests found
......@@ -2350,19 +2350,11 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
list_del(&page->lru);
pcp->count--;
} else {
if (unlikely(gfp_flags & __GFP_NOFAIL)) {
/*
* __GFP_NOFAIL is not to be used in new code.
*
* All __GFP_NOFAIL callers should be fixed so that they
* properly detect and handle allocation failures.
*
* We most definitely don't want callers attempting to
* allocate greater than order-1 page units with
* __GFP_NOFAIL.
* allocate greater than order-1 page units with __GFP_NOFAIL.
*/
WARN_ON_ONCE(order > 1);
}
WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1));
spin_lock_irqsave(&zone->lock, flags);
page = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment