Skip to content

Commit

Permalink
mm/memory-failure.c: move comment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Naoya Horiguchi authored and Linus Torvalds committed Jun 4, 2014
1 parent 888cf2d commit 6edd6cc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mm/memory-failure.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand Down Expand Up @@ -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);

/*
Expand Down

0 comments on commit 6edd6cc

Please sign in to comment.