diff options
author | Dennis Zhou <dennis@kernel.org> | 2018-12-05 18:10:39 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-08 06:26:38 +0100 |
commit | 7754f669ffde3919e398a9e591cd7510d6cf4e73 (patch) | |
tree | 7d32cf5b86590053afa34b479bdcb1210006dfed /block/blk-cgroup.c | |
parent | blkcg: change blkg reference counting to use percpu_ref (diff) | |
download | linux-7754f669ffde3919e398a9e591cd7510d6cf4e73.tar.xz linux-7754f669ffde3919e398a9e591cd7510d6cf4e73.zip |
blkcg: rename blkg_try_get() to blkg_tryget()
blkg reference counting now uses percpu_ref rather than atomic_t. Let's
make this consistent with css_tryget. This renames blkg_try_get to
blkg_tryget and now returns a bool rather than the blkg or %NULL.
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 2ca7611fe274..6bd0619a7d6e 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1736,8 +1736,7 @@ void blkcg_maybe_throttle_current(void) blkg = blkg_lookup(blkcg, q); if (!blkg) goto out; - blkg = blkg_try_get(blkg); - if (!blkg) + if (!blkg_tryget(blkg)) goto out; rcu_read_unlock(); |