diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-02-01 18:59:52 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-01 13:09:21 -0700 |
commit | ba13e23f37c795bdd993523a6749d7afbf5ff7fb (patch) | |
tree | 2ff7419432e70889af66160c6d4c9cdd11fc50d9 | |
parent | 9ae1f8dd372e0e4c020b345cf9e09f519265e981 (diff) |
io_uring: kill not used needs_file_no_error
We have no request types left using needs_file_no_error, remove it.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | fs/io_uring.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 1310c074f4cc..66d9f3f4e43b 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -788,8 +788,6 @@ struct io_submit_state { struct io_op_def { /* needs req->file assigned */ unsigned needs_file : 1; - /* don't fail if file grab fails */ - unsigned needs_file_no_error : 1; /* hash wq insertion if file is a regular file */ unsigned hash_reg_file : 1; /* unbound wq insertion if file is a non-regular file */ @@ -6896,8 +6894,7 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req, bool fixed = req->flags & REQ_F_FIXED_FILE; req->file = io_file_get(state, req, READ_ONCE(sqe->fd), fixed); - if (unlikely(!req->file && - !io_op_defs[req->opcode].needs_file_no_error)) + if (unlikely(!req->file)) ret = -EBADF; } |