diff --git a/fs/io_uring.c b/fs/io_uring.c index 012bc0efb9d3cba3241c5fe71883106f5616b092..d542f1cf4428ed79af62c76273d32885490f72ff 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1838,6 +1838,7 @@ static void io_sq_wq_submit_work(struct work_struct *work) do { struct sqe_submit *s = &req->submit; const struct io_uring_sqe *sqe = s->sqe; + unsigned int flags = req->flags; /* Ensure we clear previously set non-block flag */ req->rw.ki_flags &= ~IOCB_NOWAIT; @@ -1883,7 +1884,7 @@ static void io_sq_wq_submit_work(struct work_struct *work) kfree(sqe); /* req from defer and link list needn't decrease async cnt */ - if (req->flags & (REQ_F_IO_DRAINED | REQ_F_LINK_DONE)) + if (flags & (REQ_F_IO_DRAINED | REQ_F_LINK_DONE)) goto out; if (!async_list)