From: Jens Axboe Date: Sat, 12 Mar 2022 13:50:13 +0000 (-0700) Subject: io_uring: remove duplicated member check for io_msg_ring_prep() X-Git-Tag: v6.1-rc5~1632^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3b6a41eb2bbdf545a42e54d637c34f4b1fdf5b9;p=platform%2Fkernel%2Flinux-starfive.git io_uring: remove duplicated member check for io_msg_ring_prep() Julia and the kernel test robot report that the prep handling for this command inadvertently checks one field twice: fs/io_uring.c:4338:42-56: duplicated argument to && or || Get rid of it. Reported-by: kernel test robot Reported-by: Julia Lawall Fixes: 4f57f06ce218 ("io_uring: add support for IORING_OP_MSG_RING command") Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index 229b31d..299154e 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4389,9 +4389,8 @@ static int io_nop(struct io_kiocb *req, unsigned int issue_flags) static int io_msg_ring_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { - if (unlikely(sqe->addr || sqe->ioprio || sqe->buf_index || - sqe->rw_flags || sqe->splice_fd_in || sqe->buf_index || - sqe->personality)) + if (unlikely(sqe->addr || sqe->ioprio || sqe->rw_flags || + sqe->splice_fd_in || sqe->buf_index || sqe->personality)) return -EINVAL; if (req->file->f_op != &io_uring_fops)