]> git.ipfire.org Git - people/ms/linux.git/commitdiff
io_uring: use right issue_flags for splice/tee
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 13 Apr 2022 15:10:33 +0000 (16:10 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 13 Apr 2022 16:25:36 +0000 (10:25 -0600)
Pass right issue_flags into into io_file_get_fixed() instead of
IO_URING_F_UNLOCKED. It's probably not a problem at the moment but let's
do it safer.

Fixes: 6bf9c47a3989 ("io_uring: defer file assignment")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/7d242daa9df5d776907686977cd29fbceb4a2d8d.1649862516.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c

index 6b1a98697dcf295e20828abed8b670e5099915b3..3d6cbf77c89d39d358abffc35e5ec366a3b61915 100644 (file)
@@ -4358,7 +4358,7 @@ static int io_tee(struct io_kiocb *req, unsigned int issue_flags)
                return -EAGAIN;
 
        if (sp->flags & SPLICE_F_FD_IN_FIXED)
-               in = io_file_get_fixed(req, sp->splice_fd_in, IO_URING_F_UNLOCKED);
+               in = io_file_get_fixed(req, sp->splice_fd_in, issue_flags);
        else
                in = io_file_get_normal(req, sp->splice_fd_in);
        if (!in) {
@@ -4400,7 +4400,7 @@ static int io_splice(struct io_kiocb *req, unsigned int issue_flags)
                return -EAGAIN;
 
        if (sp->flags & SPLICE_F_FD_IN_FIXED)
-               in = io_file_get_fixed(req, sp->splice_fd_in, IO_URING_F_UNLOCKED);
+               in = io_file_get_fixed(req, sp->splice_fd_in, issue_flags);
        else
                in = io_file_get_normal(req, sp->splice_fd_in);
        if (!in) {