summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2019-12-17 20:57:05 +0300
committerJens Axboe <axboe@kernel.dk>2019-12-17 19:57:27 -0700
commitffbb8d6b76910d4f3a2bafeaf68c419011e98d05 (patch)
treedb34d3d063a05448d1264436c8722ac4c92192bc /fs/io_uring.c
parent8ed8d3c3bc32bf5b442c9f54013b4a47d5cae740 (diff)
downloadlinux-ffbb8d6b76910d4f3a2bafeaf68c419011e98d05.tar.gz
linux-ffbb8d6b76910d4f3a2bafeaf68c419011e98d05.tar.bz2
linux-ffbb8d6b76910d4f3a2bafeaf68c419011e98d05.zip
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 to set IOSQE_IO_LINK separately, though it could be there. Add proper check and ensure that IOSQE_IO_HARDLINK implies IOSQE_IO_LINK. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 67e1758bc937..b476bd304045 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3698,7 +3698,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;
}