]> git.baikalelectronics.ru Git - kernel.git/commit
mm: fix missing handler for __GFP_NOWARN
authorQi Zheng <zhengqi.arch@bytedance.com>
Thu, 19 May 2022 21:08:55 +0000 (14:08 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 19 May 2022 21:08:55 +0000 (14:08 -0700)
commit648880c8675b1ec474222974d076671eeb5f6b0c
treec2b292958bd1ba0306f28daf2a3640b6bd4e54b4
parent3828e787fdb9b657251ee9d1f1777bd6076cc50d
mm: fix missing handler for __GFP_NOWARN

We expect no warnings to be issued when we specify __GFP_NOWARN, but
currently in paths like alloc_pages() and kmalloc(), there are still some
warnings printed, fix it.

But for some warnings that report usage problems, we don't deal with them.
If such warnings are printed, then we should fix the usage problems.
Such as the following case:

WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1));

[zhengqi.arch@bytedance.com: v2]
Link: https://lkml.kernel.org/r/20220511061951.1114-1-zhengqi.arch@bytedance.com
Link: https://lkml.kernel.org/r/20220510113809.80626-1-zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/fault-inject.h
lib/fault-inject.c
mm/failslab.c
mm/internal.h
mm/page_alloc.c