aboutsummaryrefslogtreecommitdiffstats
path: root/fs/aio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 26c1930889fa..b74c567383bc 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1329,6 +1329,10 @@ static ssize_t aio_rw_vect_retry(struct kiocb *iocb)
1329 opcode = IOCB_CMD_PWRITEV; 1329 opcode = IOCB_CMD_PWRITEV;
1330 } 1330 }
1331 1331
1332 /* This matches the pread()/pwrite() logic */
1333 if (iocb->ki_pos < 0)
1334 return -EINVAL;
1335
1332 do { 1336 do {
1333 ret = rw_op(iocb, &iocb->ki_iovec[iocb->ki_cur_seg], 1337 ret = rw_op(iocb, &iocb->ki_iovec[iocb->ki_cur_seg],
1334 iocb->ki_nr_segs - iocb->ki_cur_seg, 1338 iocb->ki_nr_segs - iocb->ki_cur_seg,