> + if (!state) > + req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL); Just return an error here if kmem_cache_alloc fails. > + if (req) > + io_req_init(ctx, req); Because all the other ones can't reached this with a NULL req.
> + if (!state) > + req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL); Just return an error here if kmem_cache_alloc fails. > + if (req) > + io_req_init(ctx, req); Because all the other ones can't reached this with a NULL req.