diff options
author | Michal Hocko <mhocko@suse.com> | 2016-03-17 17:19:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-17 18:09:34 -0400 |
commit | 0f352e5392c86d054998dd6526f2fdc33ec4bed5 (patch) | |
tree | dc1e5436e7c42ed026dbd3725a49792f4d7aa3b5 /mm | |
parent | 95813b8faa0cd315f61a8b9d9c523792370b693e (diff) |
mm: remove __GFP_NOFAIL is deprecated comment
Commit 647757197cd3 ("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: Michal Hocko <mhocko@suse.com>
Reviewed-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 30134a8f7cc8..30f01c6f6b88 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2350,19 +2350,11 @@ struct page *buffered_rmqueue(struct zone *preferred_zone, | |||
2350 | list_del(&page->lru); | 2350 | list_del(&page->lru); |
2351 | pcp->count--; | 2351 | pcp->count--; |
2352 | } else { | 2352 | } else { |
2353 | if (unlikely(gfp_flags & __GFP_NOFAIL)) { | 2353 | /* |
2354 | /* | 2354 | * We most definitely don't want callers attempting to |
2355 | * __GFP_NOFAIL is not to be used in new code. | 2355 | * allocate greater than order-1 page units with __GFP_NOFAIL. |
2356 | * | 2356 | */ |
2357 | * All __GFP_NOFAIL callers should be fixed so that they | 2357 | WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1)); |
2358 | * properly detect and handle allocation failures. | ||
2359 | * | ||
2360 | * We most definitely don't want callers attempting to | ||
2361 | * allocate greater than order-1 page units with | ||
2362 | * __GFP_NOFAIL. | ||
2363 | */ | ||
2364 | WARN_ON_ONCE(order > 1); | ||
2365 | } | ||
2366 | spin_lock_irqsave(&zone->lock, flags); | 2358 | spin_lock_irqsave(&zone->lock, flags); |
2367 | 2359 | ||
2368 | page = NULL; | 2360 | page = NULL; |