aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/aio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/aio.c b/fs/aio.c
index d6d9520f6866..0fd9181d8c0c 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1243,12 +1243,12 @@ static ssize_t aio_setup_vectored_rw(struct kiocb *kiocb,
1243 if (compat) 1243 if (compat)
1244 ret = compat_rw_copy_check_uvector(rw, 1244 ret = compat_rw_copy_check_uvector(rw,
1245 (struct compat_iovec __user *)buf, 1245 (struct compat_iovec __user *)buf,
1246 *nr_segs, 1, *iovec, iovec); 1246 *nr_segs, UIO_FASTIOV, *iovec, iovec);
1247 else 1247 else
1248#endif 1248#endif
1249 ret = rw_copy_check_uvector(rw, 1249 ret = rw_copy_check_uvector(rw,
1250 (struct iovec __user *)buf, 1250 (struct iovec __user *)buf,
1251 *nr_segs, 1, *iovec, iovec); 1251 *nr_segs, UIO_FASTIOV, *iovec, iovec);
1252 if (ret < 0) 1252 if (ret < 0)
1253 return ret; 1253 return ret;
1254 1254
@@ -1285,7 +1285,7 @@ static ssize_t aio_run_iocb(struct kiocb *req, unsigned opcode,
1285 fmode_t mode; 1285 fmode_t mode;
1286 aio_rw_op *rw_op; 1286 aio_rw_op *rw_op;
1287 rw_iter_op *iter_op; 1287 rw_iter_op *iter_op;
1288 struct iovec inline_vec, *iovec = &inline_vec; 1288 struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
1289 struct iov_iter iter; 1289 struct iov_iter iter;
1290 1290
1291 switch (opcode) { 1291 switch (opcode) {
@@ -1320,7 +1320,7 @@ rw_common:
1320 if (!ret) 1320 if (!ret)
1321 ret = rw_verify_area(rw, file, &req->ki_pos, req->ki_nbytes); 1321 ret = rw_verify_area(rw, file, &req->ki_pos, req->ki_nbytes);
1322 if (ret < 0) { 1322 if (ret < 0) {
1323 if (iovec != &inline_vec) 1323 if (iovec != inline_vecs)
1324 kfree(iovec); 1324 kfree(iovec);
1325 return ret; 1325 return ret;
1326 } 1326 }
@@ -1367,7 +1367,7 @@ rw_common:
1367 return -EINVAL; 1367 return -EINVAL;
1368 } 1368 }
1369 1369
1370 if (iovec != &inline_vec) 1370 if (iovec != inline_vecs)
1371 kfree(iovec); 1371 kfree(iovec);
1372 1372
1373 if (ret != -EIOCBQUEUED) { 1373 if (ret != -EIOCBQUEUED) {