Skip to contentSkip to conversation

io_uring: make HARDLINK imply LINK

PATCH Applied Pavel Begunkov 2 participants 2 messages Dec 17, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 io_uring: make HARDLINK imply LINK

The rules are as follows, if IOSQE_IO_HARDLINK is specified, then it's a link and there is no need in IOSQE_IO_LINK, though it could be there. Add proper check.

---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/io_uring.c +1 -1
index 339b57aac5ca..eb6d897ea087 100644
@@ -3577,7 +3577,7 @@ static int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr,
 		 * If previous wasn't linked and we have a linked command,
 		 * that's the end of the chain. Submit the previous link.
 		 */
-		if (!(sqe_flags & IOSQE_IO_LINK) && link) {
+		if (!(sqe_flags & (IOSQE_IO_LINK|IOSQE_IO_HARDLINK)) && link) {
 			io_queue_link_head(link);
 			link = NULL;
 		}
Signature · 1 line
2.24.0
maintainer Applied
#2 lore raw
Quoted 3 lines · Pavel Begunkov

The rules are as follows, if IOSQE_IO_HARDLINK is specified, then it's a link and there is no need in IOSQE_IO_LINK, though it could be there. Add proper check.

Applied, thanks.

Signature · 1 line
Jens Axboe