diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-17 13:35:57 -0800 |
|---|---|---|
| committer | Julian Veit <claymore1298@gmail.com> | 2021-08-23 15:25:40 +0200 |
| commit | 0b9e75ee9e7c89b4cb59379ba30dae4662bca086 (patch) | |
| tree | f46d2474e04b3a0c0b9135804c2cc2bb167729bd | |
| parent | e17d5da8dc846d6d524cf02e1c0f1903ddb1fdad (diff) | |
block: Substitute rcu_access_pointer() for rcu_dereference_raw()r11.1
(Trivial patch.)
If the code is looking at the RCU-protected pointer itself, but not
dereferencing it, the rcu_dereference() functions can be downgraded to
rcu_access_pointer(). This commit makes this downgrade in blkg_destroy()
and ioc_destroy_icq(), both of which simply compare the RCU-protected
pointer against another pointer with no dereferencing.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: Ia2fbc89ff4f9b32851dd469a93280892407fc51f
| -rw-r--r-- | block/blk-ioc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-ioc.c b/block/blk-ioc.c index d770eae6df0..0767587cbaa 100644 --- a/block/blk-ioc.c +++ b/block/blk-ioc.c @@ -69,7 +69,7 @@ static void ioc_destroy_icq(struct io_cq *icq) * under queue_lock. If it's not pointing to @icq now, it never * will. Hint assignment itself can race safely. */ - if (rcu_dereference_raw(ioc->icq_hint) == icq) + if (rcu_access_pointer(ioc->icq_hint) == icq) rcu_assign_pointer(ioc->icq_hint, NULL); ioc_exit_icq(icq); |
