aboutsummaryrefslogtreecommitdiffstats
path: root/fs/aio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 287a1bc7a182..d3a6ec2c9627 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -47,8 +47,8 @@ unsigned long aio_nr; /* current system wide number of aio requests */
47unsigned long aio_max_nr = 0x10000; /* system wide maximum number of aio requests */ 47unsigned long aio_max_nr = 0x10000; /* system wide maximum number of aio requests */
48/*----end sysctl variables---*/ 48/*----end sysctl variables---*/
49 49
50static kmem_cache_t *kiocb_cachep; 50static struct kmem_cache *kiocb_cachep;
51static kmem_cache_t *kioctx_cachep; 51static struct kmem_cache *kioctx_cachep;
52 52
53static struct workqueue_struct *aio_wq; 53static struct workqueue_struct *aio_wq;
54 54
@@ -666,17 +666,6 @@ static ssize_t aio_run_iocb(struct kiocb *iocb)
666 ssize_t (*retry)(struct kiocb *); 666 ssize_t (*retry)(struct kiocb *);
667 ssize_t ret; 667 ssize_t ret;
668 668
669 if (iocb->ki_retried++ > 1024*1024) {
670 printk("Maximal retry count. Bytes done %Zd\n",
671 iocb->ki_nbytes - iocb->ki_left);
672 return -EAGAIN;
673 }
674
675 if (!(iocb->ki_retried & 0xff)) {
676 pr_debug("%ld retry: %zd of %zd\n", iocb->ki_retried,
677 iocb->ki_nbytes - iocb->ki_left, iocb->ki_nbytes);
678 }
679
680 if (!(retry = iocb->ki_retry)) { 669 if (!(retry = iocb->ki_retry)) {
681 printk("aio_run_iocb: iocb->ki_retry = NULL\n"); 670 printk("aio_run_iocb: iocb->ki_retry = NULL\n");
682 return 0; 671 return 0;
@@ -1005,9 +994,6 @@ int fastcall aio_complete(struct kiocb *iocb, long res, long res2)
1005 kunmap_atomic(ring, KM_IRQ1); 994 kunmap_atomic(ring, KM_IRQ1);
1006 995
1007 pr_debug("added to ring %p at [%lu]\n", iocb, tail); 996 pr_debug("added to ring %p at [%lu]\n", iocb, tail);
1008
1009 pr_debug("%ld retries: %zd of %zd\n", iocb->ki_retried,
1010 iocb->ki_nbytes - iocb->ki_left, iocb->ki_nbytes);
1011put_rq: 997put_rq:
1012 /* everything turned out well, dispose of the aiocb. */ 998 /* everything turned out well, dispose of the aiocb. */
1013 ret = __aio_put_req(ctx, iocb); 999 ret = __aio_put_req(ctx, iocb);
@@ -1413,7 +1399,6 @@ static ssize_t aio_setup_single_vector(struct kiocb *kiocb)
1413 kiocb->ki_iovec->iov_len = kiocb->ki_left; 1399 kiocb->ki_iovec->iov_len = kiocb->ki_left;
1414 kiocb->ki_nr_segs = 1; 1400 kiocb->ki_nr_segs = 1;
1415 kiocb->ki_cur_seg = 0; 1401 kiocb->ki_cur_seg = 0;
1416 kiocb->ki_nbytes = kiocb->ki_left;
1417 return 0; 1402 return 0;
1418} 1403}
1419 1404
@@ -1591,7 +1576,6 @@ int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
1591 req->ki_opcode = iocb->aio_lio_opcode; 1576 req->ki_opcode = iocb->aio_lio_opcode;
1592 init_waitqueue_func_entry(&req->ki_wait, aio_wake_function); 1577 init_waitqueue_func_entry(&req->ki_wait, aio_wake_function);
1593 INIT_LIST_HEAD(&req->ki_wait.task_list); 1578 INIT_LIST_HEAD(&req->ki_wait.task_list);
1594 req->ki_retried = 0;
1595 1579
1596 ret = aio_setup_iocb(req); 1580 ret = aio_setup_iocb(req);
1597 1581