summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXishi Qiu <qiuxishi@huawei.com>2013-04-17 15:58:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-17 16:10:45 -0700
commitd72515b85a6583db131ec6032978e3c9d4291d95 (patch)
tree6cd1752cb4e54c9c045cf3f18e07712fd6ded89b
parent12f267a20aecf8b84a2a9069b9011f1661c779b4 (diff)
downloadlinux-d72515b85a6583db131ec6032978e3c9d4291d95.tar.bz2
mm/vmscan: fix error return in kswapd_run()
Fix the error return value in kswapd_run(). The bug was introduced by commit d5dc0ad928fb ("mm/vmscan: fix error number for failed kthread"). Signed-off-by: Xishi Qiu <qiuxishi@huawei.com> Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Reviewed-by: Rik van Riel <riel@redhat.com> Reported-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/vmscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 88c5fed8b9a4..669fba39be1a 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3188,9 +3188,9 @@ int kswapd_run(int nid)
if (IS_ERR(pgdat->kswapd)) {
/* failure at boot is fatal */
BUG_ON(system_state == SYSTEM_BOOTING);
- pgdat->kswapd = NULL;
pr_err("Failed to start kswapd on node %d\n", nid);
ret = PTR_ERR(pgdat->kswapd);
+ pgdat->kswapd = NULL;
}
return ret;
}