summary refs log tree commit diff
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2012-10-08 16:29:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 16:22:24 +0900
commitd5dc0ad928fb9e972001e552597fd0b794863f34 (patch)
tree14a08839b4b95c0a7eae66efe498382b4977a16a /mm/vmscan.c
parente0f3c3f78da29b114e7c1c68019036559f715948 (diff)
downloadlinux-d5dc0ad928fb9e972001e552597fd0b794863f34.tar.gz
mm/vmscan: fix error number for failed kthread
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index f6fdae7a8d4c..d16bf5a53266 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -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;
 }