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>
This commit is contained in:
Wu Fengguang 2009-12-16 12:19:58 +01:00 коммит произвёл Andi Kleen
Родитель 1668bfd5be
Коммит db0480b3a6
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -687,6 +687,8 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
/*
* Propagate the dirty bit from PTEs to struct page first, because we
* need this to decide if we should kill or just drop the page.
* XXX: the dirty test could be racy: set_page_dirty() may not always
* be called inside page lock (it's recommended but not enforced).
*/
mapping = page_mapping(p);
if (!PageDirty(p) && mapping && mapping_cap_writeback_dirty(mapping)) {