Re: [PATCH RESEND] slub: return correct error on slab_sysfs_init

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

 



On Wed, 18 Jun 2014, Jeff Liu wrote:

> From: Jie Liu <jeff.liu@xxxxxxxxxx>
> 
> Return -ENOMEM than -ENOSYS if kset_create_and_add() failed
> 

Why?  kset_create_and_add() can fail for a few other reasons other than 
memory constraints and given that this is only done at bootstrap, it 
actually seems like a duplicate name would be a bigger concern than low on 
memory if another init call actually registered it.

> Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
> ---
>  mm/slub.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index b2b0473..e10f60f 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -5301,7 +5301,7 @@ static int __init slab_sysfs_init(void)
>  	if (!slab_kset) {
>  		mutex_unlock(&slab_mutex);
>  		pr_err("Cannot register slab subsystem.\n");
> -		return -ENOSYS;
> +		return -ENOMEM;
>  	}
>  
>  	slab_state = FULL;

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