VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Miaohe Lin <linmiaohe@huawei.com> 2021-09-02 14:59:50 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-09-03 09:58:17 -0700 commit: 2e786d9e5a2014c327d9b2eec83fa60b16af26f9 parent: b87c517ac5de168aec6e8318ca0707b11b2ccfaf
Commit Summary:
mm/vmscan: add 'else' to remove check_pending label
Diffstat:
1 file changed, 5 insertions, 7 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index ab5019700dc3..1b14a1b2539c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3578,18 +3578,14 @@ static bool throttle_direct_reclaim(gfp_t gfp_mask, struct zonelist *zonelist,
 	 * blocked waiting on the same lock. Instead, throttle for up to a
 	 * second before continuing.
 	 */
-	if (!(gfp_mask & __GFP_FS)) {
+	if (!(gfp_mask & __GFP_FS))
 		wait_event_interruptible_timeout(pgdat->pfmemalloc_wait,
 			allow_direct_reclaim(pgdat), HZ);
+	else
+		/* Throttle until kswapd wakes the process */
+		wait_event_killable(zone->zone_pgdat->pfmemalloc_wait,
+			allow_direct_reclaim(pgdat));
 
-		goto check_pending;
-	}
-
-	/* Throttle until kswapd wakes the process */
-	wait_event_killable(zone->zone_pgdat->pfmemalloc_wait,
-		allow_direct_reclaim(pgdat));
-
-check_pending:
 	if (fatal_signal_pending(current))
 		return true;