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]

 



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



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux