]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mm: page_alloc: move pm_* function into power
authorKefeng Wang <wangkefeng.wang@huawei.com>
Tue, 16 May 2023 06:38:18 +0000 (14:38 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 9 Jun 2023 23:25:24 +0000 (16:25 -0700)
commit07f44ac3c90c50a201307d3fe4dda120ee8394f5
tree17b651ff3917a387f390e1638bfe3c7cdb104194
parent31a1b9d7fe768db521b12287ec6426983e9787e3
mm: page_alloc: move pm_* function into power

pm_restrict_gfp_mask()/pm_restore_gfp_mask() only used in power, let's
move them out of page_alloc.c.

Adding a general gfp_has_io_fs() function which return true if gfp with
both __GFP_IO and __GFP_FS flags, then use it inside of
pm_suspended_storage(), also the pm_suspended_storage() is moved into
suspend.h.

Link: https://lkml.kernel.org/r/20230516063821.121844-11-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Len Brown <len.brown@intel.com>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/gfp.h
include/linux/suspend.h
kernel/power/main.c
kernel/power/power.h
mm/page_alloc.c
mm/swapfile.c