mirror of https://github.com/torvalds/linux.git
io_uring/cmd: drop unused res2 param from io_uring_cmd_done()
Commit 79525b51ac ("io_uring: fix nvme's 32b cqes on mixed cq") split
out a separate io_uring_cmd_done32() helper for ->uring_cmd()
implementations that return 32-byte CQEs. The res2 value passed to
io_uring_cmd_done() is now unused because __io_uring_cmd_done() ignores
it when is_cqe32 is passed as false. So drop the parameter from
io_uring_cmd_done() to simplify the callers and clarify that it's not
possible to return an extra value beyond the 32-bit CQE result.
Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
79525b51ac
commit
ef9f603fd3
|
|
@ -776,7 +776,7 @@ static void blk_cmd_complete(struct io_uring_cmd *cmd, unsigned int issue_flags)
|
||||||
if (bic->res == -EAGAIN && bic->nowait)
|
if (bic->res == -EAGAIN && bic->nowait)
|
||||||
io_uring_cmd_issue_blocking(cmd);
|
io_uring_cmd_issue_blocking(cmd);
|
||||||
else
|
else
|
||||||
io_uring_cmd_done(cmd, bic->res, 0, issue_flags);
|
io_uring_cmd_done(cmd, bic->res, issue_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bio_cmd_bio_end_io(struct bio *bio)
|
static void bio_cmd_bio_end_io(struct bio *bio)
|
||||||
|
|
|
||||||
|
|
@ -1188,7 +1188,7 @@ static void ublk_complete_io_cmd(struct ublk_io *io, struct request *req,
|
||||||
struct io_uring_cmd *cmd = __ublk_prep_compl_io_cmd(io, req);
|
struct io_uring_cmd *cmd = __ublk_prep_compl_io_cmd(io, req);
|
||||||
|
|
||||||
/* tell ublksrv one io request is coming */
|
/* tell ublksrv one io request is coming */
|
||||||
io_uring_cmd_done(cmd, res, 0, issue_flags);
|
io_uring_cmd_done(cmd, res, issue_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define UBLK_REQUEUE_DELAY_MS 3
|
#define UBLK_REQUEUE_DELAY_MS 3
|
||||||
|
|
@ -1805,7 +1805,7 @@ static void ublk_cancel_cmd(struct ublk_queue *ubq, unsigned tag,
|
||||||
spin_unlock(&ubq->cancel_lock);
|
spin_unlock(&ubq->cancel_lock);
|
||||||
|
|
||||||
if (!done)
|
if (!done)
|
||||||
io_uring_cmd_done(io->cmd, UBLK_IO_RES_ABORT, 0, issue_flags);
|
io_uring_cmd_done(io->cmd, UBLK_IO_RES_ABORT, issue_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -2452,7 +2452,7 @@ static void ublk_ch_uring_cmd_cb(struct io_uring_cmd *cmd,
|
||||||
int ret = ublk_ch_uring_cmd_local(cmd, issue_flags);
|
int ret = ublk_ch_uring_cmd_local(cmd, issue_flags);
|
||||||
|
|
||||||
if (ret != -EIOCBQUEUED)
|
if (ret != -EIOCBQUEUED)
|
||||||
io_uring_cmd_done(cmd, ret, 0, issue_flags);
|
io_uring_cmd_done(cmd, ret, issue_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ublk_ch_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags)
|
static int ublk_ch_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags)
|
||||||
|
|
|
||||||
|
|
@ -4685,7 +4685,7 @@ static void btrfs_uring_read_finished(struct io_uring_cmd *cmd, unsigned int iss
|
||||||
btrfs_unlock_extent(io_tree, priv->start, priv->lockend, &priv->cached_state);
|
btrfs_unlock_extent(io_tree, priv->start, priv->lockend, &priv->cached_state);
|
||||||
btrfs_inode_unlock(inode, BTRFS_ILOCK_SHARED);
|
btrfs_inode_unlock(inode, BTRFS_ILOCK_SHARED);
|
||||||
|
|
||||||
io_uring_cmd_done(cmd, ret, 0, issue_flags);
|
io_uring_cmd_done(cmd, ret, issue_flags);
|
||||||
add_rchar(current, ret);
|
add_rchar(current, ret);
|
||||||
|
|
||||||
for (index = 0; index < priv->nr_pages; index++)
|
for (index = 0; index < priv->nr_pages; index++)
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@ static void fuse_uring_entry_teardown(struct fuse_ring_ent *ent)
|
||||||
spin_unlock(&queue->lock);
|
spin_unlock(&queue->lock);
|
||||||
|
|
||||||
if (cmd)
|
if (cmd)
|
||||||
io_uring_cmd_done(cmd, -ENOTCONN, 0, IO_URING_F_UNLOCKED);
|
io_uring_cmd_done(cmd, -ENOTCONN, IO_URING_F_UNLOCKED);
|
||||||
|
|
||||||
if (req)
|
if (req)
|
||||||
fuse_uring_stop_fuse_req_end(req);
|
fuse_uring_stop_fuse_req_end(req);
|
||||||
|
|
@ -518,7 +518,7 @@ static void fuse_uring_cancel(struct io_uring_cmd *cmd,
|
||||||
|
|
||||||
if (need_cmd_done) {
|
if (need_cmd_done) {
|
||||||
/* no queue lock to avoid lock order issues */
|
/* no queue lock to avoid lock order issues */
|
||||||
io_uring_cmd_done(cmd, -ENOTCONN, 0, issue_flags);
|
io_uring_cmd_done(cmd, -ENOTCONN, issue_flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -733,7 +733,7 @@ static int fuse_uring_send_next_to_ring(struct fuse_ring_ent *ent,
|
||||||
list_move_tail(&ent->list, &queue->ent_in_userspace);
|
list_move_tail(&ent->list, &queue->ent_in_userspace);
|
||||||
spin_unlock(&queue->lock);
|
spin_unlock(&queue->lock);
|
||||||
|
|
||||||
io_uring_cmd_done(cmd, 0, 0, issue_flags);
|
io_uring_cmd_done(cmd, 0, issue_flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1200,7 +1200,7 @@ static void fuse_uring_send(struct fuse_ring_ent *ent, struct io_uring_cmd *cmd,
|
||||||
ent->cmd = NULL;
|
ent->cmd = NULL;
|
||||||
spin_unlock(&queue->lock);
|
spin_unlock(&queue->lock);
|
||||||
|
|
||||||
io_uring_cmd_done(cmd, ret, 0, issue_flags);
|
io_uring_cmd_done(cmd, ret, issue_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -160,9 +160,9 @@ static inline void *io_uring_cmd_ctx_handle(struct io_uring_cmd *cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void io_uring_cmd_done(struct io_uring_cmd *ioucmd, s32 ret,
|
static inline void io_uring_cmd_done(struct io_uring_cmd *ioucmd, s32 ret,
|
||||||
u64 res2, unsigned issue_flags)
|
unsigned issue_flags)
|
||||||
{
|
{
|
||||||
return __io_uring_cmd_done(ioucmd, ret, res2, issue_flags, false);
|
return __io_uring_cmd_done(ioucmd, ret, 0, issue_flags, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void io_uring_cmd_done32(struct io_uring_cmd *ioucmd, s32 ret,
|
static inline void io_uring_cmd_done32(struct io_uring_cmd *ioucmd, s32 ret,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue