Skip to contentSkip to conversation

memory-failure/hwpoison_user_mappings: move the comment about swap cache pages' check to proper location

PATCH In review Wang Xiaoqiang 2 participants 2 messages Aug 4, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memory-failure/hwpoison_user_mappings: move the comment about swap cache pages' check to proper location

Hi Naoya,

This patch just move the comment about swap cache pages' check to the proper location in 'hwpoison_user_mappings' function.

---
 mm/memory-failure.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
mm/memory-failure.c +4 -4
index 1cf7f29..3253abb 100644
@@ -945,10 +945,6 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
 	if (!(PageLRU(hpage) || PageHuge(p)))
 		return SWAP_SUCCESS;
 
-	/*
-	 * This check implies we don't kill processes if their pages
-	 * are in the swap cache early. Those are always late kills.
-	 */
 	if (!page_mapped(hpage))
 		return SWAP_SUCCESS;
 
@@ -957,6 +953,10 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
 		return SWAP_FAIL;
 	}
 
+	/*
+	 * This check implies we don't kill processes if their pages
+	 * are in the swap cache early. Those are always late kills.
+	 */
 	if (PageSwapCache(p)) {
 		printk(KERN_ERR
 		       "MCE %#lx: keeping poisoned page in swap cache\n", pfn);
Signature · 7 lines
1.7.10.4



--
thx!
Wang Xiaoqiang
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Wang Xiaoqiang

Hi Naoya,

This patch just move the comment about swap cache pages' check to the proper location in 'hwpoison_user_mappings' function.

Thank you for finding out this.

Quoted 40 lines
---
 mm/memory-failure.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
mm/memory-failure.c +4 -4
index 1cf7f29..3253abb 100644
@@ -945,10 +945,6 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
 	if (!(PageLRU(hpage) || PageHuge(p)))
 		return SWAP_SUCCESS;
 
-	/*
-	 * This check implies we don't kill processes if their pages
-	 * are in the swap cache early. Those are always late kills.
-	 */
 	if (!page_mapped(hpage))
 		return SWAP_SUCCESS;
 
@@ -957,6 +953,10 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
 		return SWAP_FAIL;
 	}
 
+	/*
+	 * This check implies we don't kill processes if their pages
+	 * are in the swap cache early. Those are always late kills.
+	 */
 	if (PageSwapCache(p)) {
 		printk(KERN_ERR
 		       "MCE %#lx: keeping poisoned page in swap cache\n", pfn);
Signature · 7 lines
1.7.10.4



--
thx!
Wang Xiaoqiang

--
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>