Re: [PATCH] mm/memblock: If nr_new is 0 just return

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

 



On Sat,  9 Jan 2016 06:33:40 -0500 nimisolo <nimisolo@xxxxxxxxx> wrote:

> If nr_new is 0 which means there's no region would be added,
> so just return to the caller.
> 
> ...
>
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -588,6 +588,9 @@ repeat:
>  					       nid, flags);
>  	}
>  
> +	if (!nr_new)
> +		return 0;
> +
>  	/*
>  	 * If this was the first round, resize array and repeat for actual
>  	 * insertions; otherwise, merge and return.

hm, why?  Is there something actually wrong with the current code?

Under what circumstances does nr_new==0 actually happen?  Is it a bug
in the caller?

--
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]