Re: [PATCH] slub: correct return errno on slab_sysfs_init failure

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

 



On 06/16/2014 23:25 PM, Christoph Lameter wrote:
> On Mon, 16 Jun 2014, Jeff Liu wrote:
> 
>>>
>>> Dont be worried. I am not sure anymore that this was such a wise move.
>>> Maybe get kset_create_and_add to return an error code instead and return
>>> that instead of -ENOSYS?
>>
>> Personally, I prefer to get kset_create_and_add() to return an error which
>> can reflect the actual cause of the failure given that kset_register() can
>> failed due to different reasons.  If so, however, looks we have to make a
>> certain amount of change for the existing modules which are support sysfs
>> since they all return -ENOMEM if kset_create_and_add() return NULL, maybe
>> this is inherited from samples/kobject/kset-example.c...
> 
> Probably. Could you come up with patchset to clean this up? ERR_PTR() can
> be used to return an error code in a pointer value.

Sure, I'll work it out ASAP.


Cheers,
-Jeff

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