diff mbox series

[05/19] blk-cgroup: remove the !bdi->dev check in blkg_dev_name

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

Commit Message

Christoph Hellwig Feb. 1, 2023, 1:41 p.m. UTC
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(-)
diff mbox series

Patch

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);
 }