File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -889,15 +889,7 @@ static int __io_read(struct io_kiocb *req, unsigned int issue_flags)
889889 if (unlikely (ret ))
890890 return ret ;
891891
892- if (unlikely (req -> opcode == IORING_OP_READ_MULTISHOT )) {
893- void * cb_copy = rw -> kiocb .ki_complete ;
894-
895- rw -> kiocb .ki_complete = NULL ;
896- ret = io_iter_do_read (rw , & io -> iter );
897- rw -> kiocb .ki_complete = cb_copy ;
898- } else {
899- ret = io_iter_do_read (rw , & io -> iter );
900- }
892+ ret = io_iter_do_read (rw , & io -> iter );
901893
902894 /*
903895 * Some file systems like to return -EOPNOTSUPP for an IOCB_NOWAIT
@@ -995,6 +987,8 @@ int io_read_mshot(struct io_kiocb *req, unsigned int issue_flags)
995987 if (!io_file_can_poll (req ))
996988 return - EBADFD ;
997989
990+ /* make it sync, multishot doesn't support async execution */
991+ rw -> kiocb .ki_complete = NULL ;
998992 ret = __io_read (req , issue_flags );
999993
1000994 /*
You can’t perform that action at this time.
0 commit comments