Message ID | 20240626142637.300624-3-hch@lst.de |
---|---|
State | New |
Headers | show |
Series | [1/8] md: set md-specific flags for all queue limits | expand |
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 1a984179f3acc5..3a167abecdceae 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -453,9 +453,9 @@ static ssize_t queue_io_timeout_store(struct request_queue *q, const char *page, static ssize_t queue_wc_show(struct request_queue *q, char *page) { - if (q->limits.features & BLK_FLAG_WRITE_CACHE_DISABLED) - return sprintf(page, "write through\n"); - return sprintf(page, "write back\n"); + if (blk_queue_write_cache(q)) + return sprintf(page, "write back\n"); + return sprintf(page, "write through\n"); } static ssize_t queue_wc_store(struct request_queue *q, const char *page,