Re: [patch v2 3/7] blk-mq: add a new queue sysfs attribute async_depth

From: Bart Van Assche
Date: Thu Oct 09 2025 - 13:06:49 EST


On 10/9/25 12:46 AM, Yu Kuai wrote:
+static ssize_t queue_async_depth_show(struct gendisk *disk, char *page)
+{
+ ssize_t ret;
+
+ mutex_lock(&disk->queue->elevator_lock);
+ ret = queue_var_show(disk->queue->async_depth, page);
+ mutex_unlock(&disk->queue->elevator_lock);
+ return ret;
+}

Functions like the above can be simplified by using guard(mutex)(...) or
scoped_guard(mutex, ...).

Thanks,

Bart.