Re: [PATCH 10/27] aio: don't zero entire aio_kiocb aio_get_req()

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

 



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 <hch@xxxxxx>

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

-- 
Jens Axboe




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux