Skip to content

Commit b87c517

Browse files
MiaoheLintorvalds
authored andcommitted
mm/vmscan: remove unneeded return value of kswapd_run()
The return value of kswapd_run() is unused now. Clean it up. Link: https://lkml.kernel.org/r/20210717065911.61497-4-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 eaad1ae commit b87c517

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

include/linux/swap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ static inline bool node_reclaim_enabled(void)
408408

409409
extern void check_move_unevictable_pages(struct pagevec *pvec);
410410

411-
extern int kswapd_run(int nid);
411+
extern void kswapd_run(int nid);
412412
extern void kswapd_stop(int nid);
413413

414414
#ifdef CONFIG_SWAP

mm/vmscan.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4434,23 +4434,20 @@ unsigned long shrink_all_memory(unsigned long nr_to_reclaim)
44344434
* This kswapd start function will be called by init and node-hot-add.
44354435
* On node-hot-add, kswapd will moved to proper cpus if cpus are hot-added.
44364436
*/
4437-
int kswapd_run(int nid)
4437+
void kswapd_run(int nid)
44384438
{
44394439
pg_data_t *pgdat = NODE_DATA(nid);
4440-
int ret = 0;
44414440

44424441
if (pgdat->kswapd)
4443-
return 0;
4442+
return;
44444443

44454444
pgdat->kswapd = kthread_run(kswapd, pgdat, "kswapd%d", nid);
44464445
if (IS_ERR(pgdat->kswapd)) {
44474446
/* failure at boot is fatal */
44484447
BUG_ON(system_state < SYSTEM_RUNNING);
44494448
pr_err("Failed to start kswapd on node %d\n", nid);
4450-
ret = PTR_ERR(pgdat->kswapd);
44514449
pgdat->kswapd = NULL;
44524450
}
4453-
return ret;
44544451
}
44554452

44564453
/*

0 commit comments

Comments
 (0)