diff mbox series

[v2,11/13] mm: vmscan: use gfp_has_io_fs()

Message ID 20230516063821.121844-12-wangkefeng.wang@huawei.com
State Accepted
Commit 5221b5a89340f63dafa4d5f38537efb1ad506f15
Headers show
Series mm: page_alloc: misc cleanup and refector | expand

Commit Message

Kefeng Wang May 16, 2023, 6:38 a.m. UTC
Use gfp_has_io_fs() instead of open-code.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 6d0cd2840cf0..15efbfbb1963 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2458,7 +2458,7 @@  static int too_many_isolated(struct pglist_data *pgdat, int file,
 	 * won't get blocked by normal direct-reclaimers, forming a circular
 	 * deadlock.
 	 */
-	if ((sc->gfp_mask & (__GFP_IO | __GFP_FS)) == (__GFP_IO | __GFP_FS))
+	if (gfp_has_io_fs(sc->gfp_mask))
 		inactive >>= 3;
 
 	too_many = isolated > inactive;