[PATCH 2/2] mm/vmscan: fix error number for failed kthread
From: Wanpeng Li
Date: Fri Aug 24 2012 - 10:38:30 EST
From: Gavin Shan <shangw@xxxxxxxxxxxxxxxxxx>
The patch fixes 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@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Wanpeng Li <liwanp@xxxxxxxxxxxxxxxxxx>
---
mm/vmscan.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8d01243..ddf00a7 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3101,9 +3101,10 @@ 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);
- ret = -1;
+ pr_err("Failed to start kswapd on node %d\n", nid);
+ ret = PTR_ERR(pgdat->kswapd);
}
+
return ret;
}
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/