[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1345819076-12545-2-git-send-email-liwanp@linux.vnet.ibm.com>
Date: Fri, 24 Aug 2012 22:37:56 +0800
From: Wanpeng Li <liwanp@...ux.vnet.ibm.com>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, Michal Hocko <mhocko@...e.cz>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Minchan Kim <minchan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Gavin Shan <shangw@...ux.vnet.ibm.com>,
Wanpeng Li <liwanp@...ux.vnet.ibm.com>
Subject: [PATCH 2/2] mm/vmscan: fix error number for failed kthread
From: Gavin Shan <shangw@...ux.vnet.ibm.com>
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@...ux.vnet.ibm.com>
Signed-off-by: Wanpeng Li <liwanp@...ux.vnet.ibm.com>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists