aboutsummaryrefslogtreecommitdiff
path: root/fs/aio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 950630187ac..27ff56540c7 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -15,6 +15,7 @@
#include <linux/aio_abi.h>
#include <linux/module.h>
#include <linux/syscalls.h>
+#include <linux/uio.h>
#define DEBUG 0
@@ -1315,8 +1316,11 @@ static ssize_t aio_pread(struct kiocb *iocb)
ssize_t ret = 0;
do {
- ret = file->f_op->aio_read(iocb, iocb->ki_buf,
- iocb->ki_left, iocb->ki_pos);
+ iocb->ki_inline_vec.iov_base = iocb->ki_buf;
+ iocb->ki_inline_vec.iov_len = iocb->ki_left;
+
+ ret = file->f_op->aio_read(iocb, &iocb->ki_inline_vec,
+ 1, iocb->ki_pos);
/*
* Can't just depend on iocb->ki_left to determine
* whether we are done. This may have been a short read.
@@ -1349,8 +1353,11 @@ static ssize_t aio_pwrite(struct kiocb *iocb)
ssize_t ret = 0;
do {
- ret = file->f_op->aio_write(iocb, iocb->ki_buf,
- iocb->ki_left, iocb->ki_pos);
+ iocb->ki_inline_vec.iov_base = iocb->ki_buf;
+ iocb->ki_inline_vec.iov_len = iocb->ki_left;
+
+ ret = file->f_op->aio_write(iocb, &iocb->ki_inline_vec,
+ 1, iocb->ki_pos);
if (ret > 0) {
iocb->ki_buf += ret;
iocb->ki_left -= ret;