]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/memory-failure.c: move comment
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Thu, 22 May 2014 00:43:23 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:23 +0000 (10:43 +1000)
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>
mm/memory-failure.c

index 93a08bd78c788f9a9673a13225a27de07d674a48..e3154d99b87fcb2f15e122845666282b88d0ff2b 100644 (file)
@@ -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);
 
        /*