diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2015-11-05 21:49:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 22:34:48 -0500 |
commit | 98666f8a2576b12f5f3ebcef61a8cdbefede1be3 (patch) | |
tree | 46e4b858cb8ab69a510ce2518ff9b83ab9666e1a /mm/ksm.c | |
parent | f2e5ff85edea30a59b96cf9e20e8886991b0d097 (diff) |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -625,7 +625,7 @@ static void remove_rmap_item_from_tree(struct rmap_item *rmap_item) | |||
625 | unlock_page(page); | 625 | unlock_page(page); |
626 | put_page(page); | 626 | put_page(page); |
627 | 627 | ||
628 | if (stable_node->hlist.first) | 628 | if (!hlist_empty(&stable_node->hlist)) |
629 | ksm_pages_sharing--; | 629 | ksm_pages_sharing--; |
630 | else | 630 | else |
631 | ksm_pages_shared--; | 631 | ksm_pages_shared--; |