diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-17 16:35:57 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-02-18 15:21:26 -0500 |
commit | ec6c676a08b0779a32c9cec9fae7532add32fe15 (patch) | |
tree | e76b0548ed7bc4a2927aa3bc4e3bec2bc8adf7da /block/blk-cgroup.c | |
parent | e3ebf0d457039c857dfeb45434e3be9780dea499 (diff) |
block: Substitute rcu_access_pointer() for rcu_dereference_raw()
(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>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 4e491d9b5292..b6e95b5e262f 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -336,7 +336,7 @@ static void blkg_destroy(struct blkcg_gq *blkg) | |||
336 | * under queue_lock. If it's not pointing to @blkg now, it never | 336 | * under queue_lock. If it's not pointing to @blkg now, it never |
337 | * will. Hint assignment itself can race safely. | 337 | * will. Hint assignment itself can race safely. |
338 | */ | 338 | */ |
339 | if (rcu_dereference_raw(blkcg->blkg_hint) == blkg) | 339 | if (rcu_access_pointer(blkcg->blkg_hint) == blkg) |
340 | rcu_assign_pointer(blkcg->blkg_hint, NULL); | 340 | rcu_assign_pointer(blkcg->blkg_hint, NULL); |
341 | 341 | ||
342 | /* | 342 | /* |