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>
This commit is contained in:
parent
b87c517ac5
commit
2e786d9e5a
14
mm/vmscan.c
14
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue