Skip to contentSkip to conversation

thunderbolt: stream: Announce support for FMODE_NOWAIT

PATCH Applied Mika Westerberg 1 participant 2 messages Sep 22 – Sep 24

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thunderbolt: stream: Announce support for FMODE_NOWAIT

Commit 42bc6935339b ("thunderbolt: stream: Support IOCB_NOWAIT in non-blocking I/O as well") added support for IOCB_NOWAIT but forgot to actually announce it as part of the file->f_mode. Add this now so users such as io_uring can actually take advantage of IOCB_NOWAIT.

Fixes 42bc6935339b ("thunderbolt: stream: Support IOCB_NOWAIT in non-blocking I/O as well")
---
 drivers/thunderbolt/stream.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/thunderbolt/stream.c +3 -0
index bdcca78f3449..4f9a57b77bfa 100644
@@ -1118,6 +1118,9 @@ static int tbstream_dev_fops_open(struct inode *inode, struct file *file)
 	}
 
 	mutex_unlock(&sdev->lock);
+
+	/* Stream handles IOCB_NOWAIT just fine */
+	file->f_mode |= FMODE_NOWAIT;
 	return 0;
 
 err_unlock:
Signature · 1 line
2.50.1
author Applied
#1 lore raw
Quoted 7 lines · Mika Westerberg

Commit 42bc6935339b ("thunderbolt: stream: Support IOCB_NOWAIT in non-blocking I/O as well") added support for IOCB_NOWAIT but forgot to actually announce it as part of the file->f_mode. Add this now so users such as io_uring can actually take advantage of IOCB_NOWAIT.

Fixes 42bc6935339b ("thunderbolt: stream: Support IOCB_NOWAIT in non-blocking I/O as well")

Applied to thunderbolt.git/fixes.