IO-Uring Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH for-5.5] io_uring: make HARDLINK imply LINK
       [not found] <cover.1576605351.git.asml.silence@gmail.com>
@ 2019-12-17 17:57 ` Pavel Begunkov
  2019-12-17 18:09   ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2019-12-17 17:57 UTC (permalink / raw)
  To: Jens Axboe, io-uring, linux-kernel

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.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 339b57aac5ca..eb6d897ea087 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -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;
 		}
-- 
2.24.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH for-5.5] io_uring: make HARDLINK imply LINK
  2019-12-17 17:57 ` [PATCH for-5.5] io_uring: make HARDLINK imply LINK Pavel Begunkov
@ 2019-12-17 18:09   ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-12-17 18:09 UTC (permalink / raw)
  To: Pavel Begunkov, io-uring, linux-kernel

On 12/17/19 10:57 AM, Pavel Begunkov wrote:
> 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.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1576605351.git.asml.silence@gmail.com>
2019-12-17 17:57 ` [PATCH for-5.5] io_uring: make HARDLINK imply LINK Pavel Begunkov
2019-12-17 18:09   ` Jens Axboe

IO-Uring Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/io-uring/0 io-uring/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 io-uring io-uring/ https://lore.kernel.org/io-uring \
		io-uring@vger.kernel.org
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.io-uring


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git