提交 b0a7a1db 编写于 作者: S Stefan Bühler 提交者: Cheng Jian

io_uring: remove unnecessary barrier before reading SQ tail

mainline inclusion
from mainline-5.1
commit 82ab082c
category: feature
bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=27
CVE: NA
---------------------------

There is no operation before to order with.
Signed-off-by: NStefan Bühler <source@stbuehler.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NZhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Nyangerkun <yangerkun@huawei.com>
Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 f1319b35
...@@ -1828,8 +1828,6 @@ static bool io_get_sqring(struct io_ring_ctx *ctx, struct sqe_submit *s) ...@@ -1828,8 +1828,6 @@ static bool io_get_sqring(struct io_ring_ctx *ctx, struct sqe_submit *s)
* though the application is the one updating it. * though the application is the one updating it.
*/ */
head = ctx->cached_sq_head; head = ctx->cached_sq_head;
/* See comment at the top of this file */
smp_rmb();
/* make sure SQ entry isn't read before tail */ /* make sure SQ entry isn't read before tail */
if (head == smp_load_acquire(&ring->r.tail)) if (head == smp_load_acquire(&ring->r.tail))
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册