]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm/hwpoison: fix page refcount of unknown non LRU page
authorWanpeng Li <wanpeng.li@hotmail.com>
Fri, 14 Aug 2015 22:34:56 +0000 (15:34 -0700)
committerJiri Slaby <jslaby@suse.cz>
Tue, 25 Aug 2015 14:57:07 +0000 (16:57 +0200)
commit5b7ceda1ba18ac596c7e2741b2dd08cb9be48502
tree4864e86aaf8fbab82e1123ac794e3f4413eef55a
parent9ae388fbe87e9203f3ed81c4229d48795a68057d
mm/hwpoison: fix page refcount of unknown non LRU page

commit 4f32be677b124a49459e2603321c7a5605ceb9f8 upstream.

After trying to drain pages from pagevec/pageset, we try to get reference
count of the page again, however, the reference count of the page is not
reduced if the page is still not on LRU list.

Fix it by adding the put_page() to drop the page reference which is from
__get_any_page().

Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
mm/memory-failure.c