]> git.baikalelectronics.ru Git - kernel.git/commit
rq-qos: use a mb for got_token
authorJosef Bacik <josef@toxicpanda.com>
Tue, 16 Jul 2019 20:19:29 +0000 (16:19 -0400)
committerJens Axboe <axboe@kernel.dk>
Thu, 18 Jul 2019 16:20:14 +0000 (10:20 -0600)
commitf6d7cf4066882d4658af3020ead4b2e838c79ed3
tree2144d14a14682be1c068249731f6edcfda9e4ff4
parent40bd3558f59ffb165551ee82d152bae9dee87907
rq-qos: use a mb for got_token

Oleg noticed that our checking of data.got_token is unsafe in the
cleanup case, and should really use a memory barrier.  Use a wmb on the
write side, and a rmb() on the read side.  We don't need one in the main
loop since we're saved by set_current_state().

Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-rq-qos.c