diff options
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/aio_abi.h> | 15 | #include <linux/aio_abi.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/syscalls.h> | 17 | #include <linux/syscalls.h> |
18 | #include <linux/uio.h> | ||
18 | 19 | ||
19 | #define DEBUG 0 | 20 | #define DEBUG 0 |
20 | 21 | ||
@@ -1315,8 +1316,11 @@ static ssize_t aio_pread(struct kiocb *iocb) | |||
1315 | ssize_t ret = 0; | 1316 | ssize_t ret = 0; |
1316 | 1317 | ||
1317 | do { | 1318 | do { |
1318 | ret = file->f_op->aio_read(iocb, iocb->ki_buf, | 1319 | iocb->ki_inline_vec.iov_base = iocb->ki_buf; |
1319 | iocb->ki_left, iocb->ki_pos); | 1320 | iocb->ki_inline_vec.iov_len = iocb->ki_left; |
1321 | |||
1322 | ret = file->f_op->aio_read(iocb, &iocb->ki_inline_vec, | ||
1323 | 1, iocb->ki_pos); | ||
1320 | /* | 1324 | /* |
1321 | * Can't just depend on iocb->ki_left to determine | 1325 | * Can't just depend on iocb->ki_left to determine |
1322 | * whether we are done. This may have been a short read. | 1326 | * whether we are done. This may have been a short read. |
@@ -1349,8 +1353,11 @@ static ssize_t aio_pwrite(struct kiocb *iocb) | |||
1349 | ssize_t ret = 0; | 1353 | ssize_t ret = 0; |
1350 | 1354 | ||
1351 | do { | 1355 | do { |
1352 | ret = file->f_op->aio_write(iocb, iocb->ki_buf, | 1356 | iocb->ki_inline_vec.iov_base = iocb->ki_buf; |
1353 | iocb->ki_left, iocb->ki_pos); | 1357 | iocb->ki_inline_vec.iov_len = iocb->ki_left; |
1358 | |||
1359 | ret = file->f_op->aio_write(iocb, &iocb->ki_inline_vec, | ||
1360 | 1, iocb->ki_pos); | ||
1354 | if (ret > 0) { | 1361 | if (ret > 0) { |
1355 | iocb->ki_buf += ret; | 1362 | iocb->ki_buf += ret; |
1356 | iocb->ki_left -= ret; | 1363 | iocb->ki_left -= ret; |