Skip to contentSkip to conversation

mm/vmscan: fix error return in kswapd_run()

PATCH In review Xishi Qiu 3 participants 4 messages Apr 2, 2013

Subsystems (3)
lore
Share & tools
lore

Xishi Qiu

author
#0 lore raw

PATCH 1/1 mm/vmscan: fix error return in kswapd_run()

Fix the error return value in kswapd_run(). The bug was introduced by commit d5dc0ad928fb9e972001e552597fd0b794863f34 "mm/vmscan: fix error number for failed kthread".

---
 mm/vmscan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/vmscan.c +1 -1
index 88c5fed..950636e 100644
@@ -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;
 }
Signature · 1 line
1.7.6.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Xishi Qiu

Fix the error return value in kswapd_run(). The bug was introduced by commit d5dc0ad928fb9e972001e552597fd0b794863f34 "mm/vmscan: fix error number for failed kthread".

Quoted 28 lines

---
mm/vmscan.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
mm/vmscan.c +1 -1
index 88c5fed..950636e 100644
@@ -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;
 }
Signature · 7 lines
1.7.6.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Reviewed-by on v1 1/1
#2 lore raw
In reply to Xishi Qiu
Quoted 4 lines · Xishi Qiu

Fix the error return value in kswapd_run(). The bug was introduced by commit d5dc0ad928fb9e972001e552597fd0b794863f34 "mm/vmscan: fix error number for failed kthread".

Quoted 28 lines

---
mm/vmscan.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
mm/vmscan.c +1 -1
index 88c5fed..950636e 100644
@@ -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;
 }
Signature · 7 lines
1.7.6.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Reviewed-by on v1 1/1
#3 lore raw
In reply to Xishi Qiu
Quoted 5 lines · Xishi Qiu

Fix the error return value in kswapd_run(). The bug was introduced by commit d5dc0ad928fb9e972001e552597fd0b794863f34 "mm/vmscan: fix error number for failed kthread".

Signature · 7 lines
All rights reversed

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>