From: Christoph Hellwig Date: Fri, 3 Feb 2023 15:03:46 +0000 (+0100) Subject: blk-cgroup: remove the !bdi->dev check in blkg_dev_name X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=180b04d450a7137270c12dbb6bebf1d5e6c0a6f2;p=linux.git blk-cgroup: remove the !bdi->dev check in blkg_dev_name bdi_dev_name already performs the same check. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-6-hch@lst.de Signed-off-by: Jens Axboe --- diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 1038688568926..0b3226cbf3f25 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -572,7 +572,7 @@ static int blkcg_reset_stats(struct cgroup_subsys_state *css, const char *blkg_dev_name(struct blkcg_gq *blkg) { - if (!blkg->q->disk || !blkg->q->disk->bdi->dev) + if (!blkg->q->disk) return NULL; return bdi_dev_name(blkg->q->disk->bdi); }