mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
mm/vmscan: print err before panic
If panic is enable,the err information will not be printed before bugon, So swap it. Print the return value of PTR_ERR(pgdat->kswapd) also. Link: https://lkml.kernel.org/r/20230906083700.181-1-angus.chen@jaguarmicro.com Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
40dca9b3d6
commit
037dd8f902
@ -7892,8 +7892,9 @@ void __meminit kswapd_run(int nid)
|
||||
pgdat->kswapd = kthread_run(kswapd, pgdat, "kswapd%d", nid);
|
||||
if (IS_ERR(pgdat->kswapd)) {
|
||||
/* failure at boot is fatal */
|
||||
pr_err("Failed to start kswapd on node %d,ret=%ld\n",
|
||||
nid, PTR_ERR(pgdat->kswapd));
|
||||
BUG_ON(system_state < SYSTEM_RUNNING);
|
||||
pr_err("Failed to start kswapd on node %d\n", nid);
|
||||
pgdat->kswapd = NULL;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user