]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/vmscan: fix error number for failed kthread
authorWanpeng Li <liwanp@linux.vnet.ibm.com>
Fri, 21 Sep 2012 00:57:23 +0000 (10:57 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 25 Sep 2012 08:46:06 +0000 (18:46 +1000)
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 <shangw@linux.vnet.ibm.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c

index f6fdae7a8d4c069e601c32b2179f2ff1b365d402..d16bf5a5326614e54cc37cedffc8a697a16b17fa 100644 (file)
@@ -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;
 }