Skip to content

Commit e941976

Browse files
isilenceaxboe
authored andcommitted
io_uring: use right issue_flags for splice/tee
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: 6bf9c47 ("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>
1 parent d2347b9 commit e941976

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/io_uring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4358,7 +4358,7 @@ static int io_tee(struct io_kiocb *req, unsigned int issue_flags)
43584358
return -EAGAIN;
43594359

43604360
if (sp->flags & SPLICE_F_FD_IN_FIXED)
4361-
in = io_file_get_fixed(req, sp->splice_fd_in, IO_URING_F_UNLOCKED);
4361+
in = io_file_get_fixed(req, sp->splice_fd_in, issue_flags);
43624362
else
43634363
in = io_file_get_normal(req, sp->splice_fd_in);
43644364
if (!in) {
@@ -4400,7 +4400,7 @@ static int io_splice(struct io_kiocb *req, unsigned int issue_flags)
44004400
return -EAGAIN;
44014401

44024402
if (sp->flags & SPLICE_F_FD_IN_FIXED)
4403-
in = io_file_get_fixed(req, sp->splice_fd_in, IO_URING_F_UNLOCKED);
4403+
in = io_file_get_fixed(req, sp->splice_fd_in, issue_flags);
44044404
else
44054405
in = io_file_get_normal(req, sp->splice_fd_in);
44064406
if (!in) {

0 commit comments

Comments
 (0)