On Thu, 15 Oct 2015, Andrea Arcangeli wrote: > This just uses the helper function to cleanup the assumption on the > hlist_node internals. > > Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx> Acked-by: Hugh Dickins <hughd@xxxxxxxxxx> > --- > mm/ksm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/ksm.c b/mm/ksm.c > index 929b5c2..241588e 100644 > --- a/mm/ksm.c > +++ b/mm/ksm.c > @@ -661,7 +661,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--; > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>