diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-12-16 06:19:58 -0500 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2009-12-16 06:19:58 -0500 |
commit | db0480b3a61bd6ad86ead3b8bbad094ab0996932 (patch) | |
tree | 31b3d85181201234694a19d05590d7c5084f89ed /mm/memory-failure.c | |
parent | 1668bfd5be9d8a52536c4865000fbbe065a3613b (diff) |
HWPOISON: comment the possible set_page_dirty() race
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index b62287db87af..dc47415a5511 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -687,6 +687,8 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, | |||
687 | /* | 687 | /* |
688 | * Propagate the dirty bit from PTEs to struct page first, because we | 688 | * Propagate the dirty bit from PTEs to struct page first, because we |
689 | * need this to decide if we should kill or just drop the page. | 689 | * need this to decide if we should kill or just drop the page. |
690 | * XXX: the dirty test could be racy: set_page_dirty() may not always | ||
691 | * be called inside page lock (it's recommended but not enforced). | ||
690 | */ | 692 | */ |
691 | mapping = page_mapping(p); | 693 | mapping = page_mapping(p); |
692 | if (!PageDirty(p) && mapping && mapping_cap_writeback_dirty(mapping)) { | 694 | if (!PageDirty(p) && mapping && mapping_cap_writeback_dirty(mapping)) { |