Skip to content

Commit 2e786d9

Browse files
MiaoheLintorvalds
authored andcommitted
mm/vmscan: add 'else' to remove check_pending label
We could add 'else' to remove the somewhat odd check_pending label to make code core succinct. Link: https://lkml.kernel.org/r/20210717065911.61497-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Alex Shi <alexs@kernel.org> Cc: Alistair Popple <apopple@nvidia.com> Cc: David Hildenbrand <david@redhat.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Shaohua Li <shli@fb.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Yu Zhao <yuzhao@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b87c517 commit 2e786d9

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

mm/vmscan.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3578,18 +3578,14 @@ static bool throttle_direct_reclaim(gfp_t gfp_mask, struct zonelist *zonelist,
35783578
* blocked waiting on the same lock. Instead, throttle for up to a
35793579
* second before continuing.
35803580
*/
3581-
if (!(gfp_mask & __GFP_FS)) {
3581+
if (!(gfp_mask & __GFP_FS))
35823582
wait_event_interruptible_timeout(pgdat->pfmemalloc_wait,
35833583
allow_direct_reclaim(pgdat), HZ);
3584+
else
3585+
/* Throttle until kswapd wakes the process */
3586+
wait_event_killable(zone->zone_pgdat->pfmemalloc_wait,
3587+
allow_direct_reclaim(pgdat));
35843588

3585-
goto check_pending;
3586-
}
3587-
3588-
/* Throttle until kswapd wakes the process */
3589-
wait_event_killable(zone->zone_pgdat->pfmemalloc_wait,
3590-
allow_direct_reclaim(pgdat));
3591-
3592-
check_pending:
35933589
if (fatal_signal_pending(current))
35943590
return true;
35953591

0 commit comments

Comments
 (0)