Skip to content

Commit

Permalink
ksm: use the helper method to do the hlist_empty check
Browse files Browse the repository at this point in the history
This just uses the helper function to cleanup the assumption on the
hlist_node internals.

Signed-off-by: Andrea Arcangeli <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Cc: Petr Holasek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
aagit authored and torvalds committed Nov 6, 2015
1 parent f2e5ff8 commit 98666f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/ksm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit 98666f8

Please sign in to comment.