Re: [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailedkmem cache allocation

From: Gu Zheng
Date: Tue Oct 22 2013 - 01:51:45 EST


On 10/22/2013 11:49 AM, Gao feng wrote:

> On 10/21/2013 03:24 PM, Gu Zheng wrote:
>> +static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep,
>> + gfp_t flags)
>> +{
>> + void *entry = kmem_cache_alloc(cachep, flags);
>> +retry:
>
> retry after kmem_cache_alloc?

Oh~, stupid mistake, thanks for your reminder.:)

>
>> + if (!entry) {
>> + cond_resched();
>> + goto retry;
>> + }
>> +
>> + return entry;
>> +}
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/