summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorXishi Qiu <qiuxishi@huawei.com>2013-04-18 00:58:34 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-18 01:10:45 +0200
commitd72515b85a6583db131ec6032978e3c9d4291d95 (patch)
tree6cd1752cb4e54c9c045cf3f18e07712fd6ded89b /mm
parenthfsplus: fix potential overflow in hfsplus_file_truncate() (diff)
downloadlinux-d72515b85a6583db131ec6032978e3c9d4291d95.tar.xz
linux-d72515b85a6583db131ec6032978e3c9d4291d95.zip
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>
Diffstat (limited to 'mm')
-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;
}