summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-04-29 18:25:12 +0300
committerJens Axboe <axboe@kernel.dk>2022-05-09 15:29:06 +0300
commitbb68d504f7c4183178b00c1af68fca870728e7e0 (patch)
treeb319ff4ef3dc015d9a6a63da0e992163140fa9ab /fs
parente5b003495e934321f78ba1f95e48da4a8c3a3a35 (diff)
downloadlinux-bb68d504f7c4183178b00c1af68fca870728e7e0.tar.xz
io_uring: ignore ->buf_index if REQ_F_BUFFER_SELECT isn't set
There's no point in validity checking buf_index if the request doesn't have REQ_F_BUFFER_SELECT set, as we will never use it for that case. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/io_uring.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index e13316969e9e..bd0ee2f7df2c 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3573,10 +3573,6 @@ static struct iovec *__io_import_iovec(int rw, struct io_kiocb *req,
return NULL;
}
- /* buffer index only valid with fixed read/write, or buffer select */
- if (unlikely(req->buf_index && !(req->flags & REQ_F_BUFFER_SELECT)))
- return ERR_PTR(-EINVAL);
-
buf = u64_to_user_ptr(req->rw.addr);
sqe_len = req->rw.len;