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)
889
889
if (unlikely (ret ))
890
890
return ret ;
891
891
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 );
901
893
902
894
/*
903
895
* 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)
995
987
if (!io_file_can_poll (req ))
996
988
return - EBADFD ;
997
989
990
+ /* make it sync, multishot doesn't support async execution */
991
+ rw -> kiocb .ki_complete = NULL ;
998
992
ret = __io_read (req , issue_flags );
999
993
1000
994
/*
You can’t perform that action at this time.
0 commit comments