Lines Matching refs:aio_req

259 static inline void ovl_aio_put(struct ovl_aio_req *aio_req)  in ovl_aio_put()  argument
261 if (refcount_dec_and_test(&aio_req->ref)) { in ovl_aio_put()
262 fdput(aio_req->fd); in ovl_aio_put()
263 kmem_cache_free(ovl_aio_request_cachep, aio_req); in ovl_aio_put()
267 static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) in ovl_aio_cleanup_handler() argument
269 struct kiocb *iocb = &aio_req->iocb; in ovl_aio_cleanup_handler()
270 struct kiocb *orig_iocb = aio_req->orig_iocb; in ovl_aio_cleanup_handler()
283 ovl_aio_put(aio_req); in ovl_aio_cleanup_handler()
288 struct ovl_aio_req *aio_req = container_of(iocb, in ovl_aio_rw_complete() local
290 struct kiocb *orig_iocb = aio_req->orig_iocb; in ovl_aio_rw_complete()
292 ovl_aio_cleanup_handler(aio_req); in ovl_aio_rw_complete()
320 struct ovl_aio_req *aio_req; in ovl_read_iter() local
323 aio_req = kmem_cache_zalloc(ovl_aio_request_cachep, GFP_KERNEL); in ovl_read_iter()
324 if (!aio_req) in ovl_read_iter()
327 aio_req->fd = real; in ovl_read_iter()
329 aio_req->orig_iocb = iocb; in ovl_read_iter()
330 kiocb_clone(&aio_req->iocb, iocb, real.file); in ovl_read_iter()
331 aio_req->iocb.ki_complete = ovl_aio_rw_complete; in ovl_read_iter()
332 refcount_set(&aio_req->ref, 2); in ovl_read_iter()
333 ret = vfs_iocb_iter_read(real.file, &aio_req->iocb, iter); in ovl_read_iter()
334 ovl_aio_put(aio_req); in ovl_read_iter()
336 ovl_aio_cleanup_handler(aio_req); in ovl_read_iter()
387 struct ovl_aio_req *aio_req; in ovl_write_iter() local
390 aio_req = kmem_cache_zalloc(ovl_aio_request_cachep, GFP_KERNEL); in ovl_write_iter()
391 if (!aio_req) in ovl_write_iter()
398 aio_req->fd = real; in ovl_write_iter()
400 aio_req->orig_iocb = iocb; in ovl_write_iter()
401 kiocb_clone(&aio_req->iocb, iocb, real.file); in ovl_write_iter()
402 aio_req->iocb.ki_flags = ifl; in ovl_write_iter()
403 aio_req->iocb.ki_complete = ovl_aio_rw_complete; in ovl_write_iter()
404 refcount_set(&aio_req->ref, 2); in ovl_write_iter()
405 ret = vfs_iocb_iter_write(real.file, &aio_req->iocb, iter); in ovl_write_iter()
406 ovl_aio_put(aio_req); in ovl_write_iter()
408 ovl_aio_cleanup_handler(aio_req); in ovl_write_iter()