mm/page-writeback: check-before-clear PageReclaim
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Wed, 15 Apr 2015 23:13:17 +0000 (16:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 Apr 2015 23:35:17 +0000 (16:35 -0700)
commita4bb3ecdc12a78dc4d0e690d40ec10887b640786
tree84e0727cc1fec4c28f578d982d8ee511757aadbf
parentb3b3a99c5371e2e96a2c680e6ac20218bddbd422
mm/page-writeback: check-before-clear PageReclaim

With the page flag sanitization patchset, an invalid usage of
ClearPageReclaim() is detected in set_page_dirty().  This can be called
from __unmap_hugepage_range(), so let's check PageReclaim() before trying
to clear it to avoid the misuse.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page-writeback.c