Skip to content

Commit

Permalink
mm/vmscan: fix error number for failed kthread
Browse files Browse the repository at this point in the history
Fix the return value while failing to create the kswapd kernel thread.
Also, the error message is prioritized as KERN_ERR.

Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Wanpeng Li <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
shangw authored and torvalds committed Oct 9, 2012
1 parent e0f3c3f commit d5dc0ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -3126,9 +3126,9 @@ int kswapd_run(int nid)
if (IS_ERR(pgdat->kswapd)) {
/* failure at boot is fatal */
BUG_ON(system_state == SYSTEM_BOOTING);
printk("Failed to start kswapd on node %d\n",nid);
pgdat->kswapd = NULL;
ret = -1;
pr_err("Failed to start kswapd on node %d\n", nid);
ret = PTR_ERR(pgdat->kswapd);
}
return ret;
}
Expand Down

0 comments on commit d5dc0ad

Please sign in to comment.