]> Git Repo - linux.git/commitdiff
mm/vmscan: print err before panic
authorAngus Chen <[email protected]>
Wed, 6 Sep 2023 08:37:00 +0000 (16:37 +0800)
committerAndrew Morton <[email protected]>
Wed, 4 Oct 2023 17:32:22 +0000 (10:32 -0700)
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/[email protected]
Signed-off-by: Angus Chen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
mm/vmscan.c

index 93fdeadea8966513ee20021b46c775918883ecb7..4062bcca5311c2983314c714f989178fa9f9a138 100644 (file)
@@ -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;
                }
        }
This page took 0.063622 seconds and 4 git commands to generate.