summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>2014-06-05 03:10:35 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-05 03:54:10 +0400
commit6edd6cc66201e06a6cc34030462217e7f4d72f4f (patch)
treef7e9ff91357392209a865b84ceee769f30a98a39 /mm
parent888cf2db475a256fb0cda042140f73d7881f81fe (diff)
downloadlinux-6edd6cc66201e06a6cc34030462217e7f4d72f4f.tar.xz
mm/memory-failure.c: move comment
The comment about pages under writeback is far from the relevant code, so let's move it to the right place. Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Andi Kleen <andi@firstfloor.org> 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/memory-failure.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 3cd1b652821c..a0474680c394 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1132,11 +1132,6 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
}
}
- /*
- * Lock the page and wait for writeback to finish.
- * It's very difficult to mess with pages currently under IO
- * and in many cases impossible, so we just avoid it here.
- */
lock_page(hpage);
/*
@@ -1186,6 +1181,10 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
if (PageHuge(p))
set_page_hwpoison_huge_page(hpage);
+ /*
+ * It's very difficult to mess with pages currently under IO
+ * and in many cases impossible, so we just avoid it here.
+ */
wait_on_page_writeback(p);
/*