diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-05-08 19:16:58 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-05-08 19:16:58 +0300 |
commit | 9b61b2069681b60d0d0bedbd0fe3c70123dddb19 (patch) | |
tree | 483407944dd3037584b8825e0d33feb7f4eddf5f /io_uring/rw.c | |
parent | b9112b17950c955071abfd4331d4daa162d6ec4d (diff) | |
parent | 2ff85dc64df5bc0ff12e2f4e23fae7bbadbf1d5d (diff) | |
download | linux-9b61b2069681b60d0d0bedbd0fe3c70123dddb19.tar.xz |
Merge branch 'topic/hda-config-pm-cleanup' into for-next
Pull HD-audio CONFIG_PM cleanup.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'io_uring/rw.c')
-rw-r--r-- | io_uring/rw.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/io_uring/rw.c b/io_uring/rw.c index 0585ebcc9773..c8d48287439e 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -937,6 +937,13 @@ int io_read_mshot(struct io_kiocb *req, unsigned int issue_flags) ret = __io_read(req, issue_flags); /* + * If the file doesn't support proper NOWAIT, then disable multishot + * and stay in single shot mode. + */ + if (!io_file_supports_nowait(req)) + req->flags &= ~REQ_F_APOLL_MULTISHOT; + + /* * If we get -EAGAIN, recycle our buffer and just let normal poll * handling arm it. */ @@ -955,7 +962,7 @@ int io_read_mshot(struct io_kiocb *req, unsigned int issue_flags) /* * Any successful return value will keep the multishot read armed. */ - if (ret > 0) { + if (ret > 0 && req->flags & REQ_F_APOLL_MULTISHOT) { /* * Put our buffer and post a CQE. If we fail to post a CQE, then * jump to the termination path. This request is then done. |