summaryrefslogtreecommitdiffstats
path: root/mm/ksm.c
diff options
context:
space:
mode:
authorAndrea Arcangeli <aarcange@redhat.com>2015-11-05 18:49:13 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-05 19:34:48 -0800
commit98666f8a2576b12f5f3ebcef61a8cdbefede1be3 (patch)
tree46e4b858cb8ab69a510ce2518ff9b83ab9666e1a /mm/ksm.c
parentf2e5ff85edea30a59b96cf9e20e8886991b0d097 (diff)
downloadlinux-stable-98666f8a2576b12f5f3ebcef61a8cdbefede1be3.tar.gz
linux-stable-98666f8a2576b12f5f3ebcef61a8cdbefede1be3.tar.bz2
linux-stable-98666f8a2576b12f5f3ebcef61a8cdbefede1be3.zip
ksm: use the helper method to do the hlist_empty check
This just uses the helper function to cleanup the assumption on the hlist_node internals. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Hugh Dickins <hughd@google.com> Cc: Petr Holasek <pholasek@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r--mm/ksm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/ksm.c b/mm/ksm.c
index 9f182f99ff5e..d4ee1591520b 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -625,7 +625,7 @@ static void remove_rmap_item_from_tree(struct rmap_item *rmap_item)
unlock_page(page);
put_page(page);
- if (stable_node->hlist.first)
+ if (!hlist_empty(&stable_node->hlist))
ksm_pages_sharing--;
else
ksm_pages_shared--;