Message ID | 20230201134123.2656505-6-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/19] block: don't call blk_throtl_stat_add for non-READ/WRITE commands | expand |
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 1038688568926e..0b3226cbf3f25d 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); }
bdi_dev_name already performs the same check. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)