> -     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 <h...@lst.de>

Reply via email to