summaryrefslogtreecommitdiff
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorAngus Chen <angus.chen@jaguarmicro.com>2023-09-06 16:37:00 +0800
committerAndrew Morton <akpm@linux-foundation.org>2023-10-04 10:32:22 -0700
commit037dd8f9024bdd5540e2b66eba56c279f740b23c (patch)
tree5c29cb3d19f7e55f934da7f82b0477b6f3f48190 /mm/vmscan.c
parent40dca9b3d65a20c4b7a48252ece572132a299302 (diff)
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>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 93fdeadea896..4062bcca5311 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -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;
}
}