Re: [PATCH 4/6] ksm: use the helper method to do the hlist_empty check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]