blk-cgroup: remove blkg_lookup_check
authorChristoph Hellwig <hch@lst.de>
Wed, 21 Sep 2022 18:04:49 +0000 (20:04 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 27 Sep 2022 01:09:31 +0000 (19:09 -0600)
commitf753526e327bc849c445c084d0f374e992038ae9
treec27a5b9517059afbd651744999bf73add92fb07e
parent4a69f325aa43847e0827fbfe4b3623307b0c9baa
blk-cgroup: remove blkg_lookup_check

The combinations of an error check with an ERR_PTR return and a lookup
with a NULL return leads to ugly handling of the return values in the
callers.  Just open coding the check and the lookup is much simpler.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andreas Herrmann <aherrmann@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20220921180501.1539876-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c