On 12/4/18 7:49 AM, Christoph Hellwig wrote:
>> -    req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL|__GFP_ZERO);
>> -    if (unlikely(!req))
>> -            return NULL;
>> +    req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL);
>> +    if (req) {
>> +            percpu_ref_get(&ctx->reqs);
>> +            req->ki_ctx = ctx;
>> +            INIT_LIST_HEAD(&req->ki_list);
>> +            refcount_set(&req->ki_refcnt, 0);
>> +            req->ki_eventfd = NULL;
>> +    }
>>  
>> -    percpu_ref_get(&ctx->reqs);
>> -    INIT_LIST_HEAD(&req->ki_list);
>> -    refcount_set(&req->ki_refcnt, 0);
>> -    req->ki_ctx = ctx;
>>      return req;
> 
> Why the reformatting?  Otherwise this looks fine to me:
> 
> Reviewed-by: Christoph Hellwig <[email protected]>

Probably just the (over) abuse of likely/unlikely in aio.c. I can get
rid of it.

-- 
Jens Axboe

Reply via email to