Skip to content
Commit ae3afb0a authored by Josef Bacik's avatar Josef Bacik Committed by Greg Kroah-Hartman
Browse files

rq-qos: use a mb for got_token



[ Upstream commit ac38297f ]

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: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 32d1d705
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment