lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3efdee9c-6605-424c-953d-17242c3a5314@yukuai.org.cn>
Date: Fri, 10 Oct 2025 01:19:11 +0800
From: Yu Kuai <hailan@...uai.org.cn>
To: Bart Van Assche <bvanassche@....org>, Yu Kuai <yukuai1@...weicloud.com>,
 axboe@...nel.dk, ming.lei@...hat.com, nilay@...ux.ibm.com, jmoyer@...hat.com
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
 yukuai3@...wei.com, yi.zhang@...wei.com, yangerkun@...wei.com,
 johnny.chenyi@...wei.com
Subject: Re: [patch v2 3/7] blk-mq: add a new queue sysfs attribute
 async_depth

Hi,

在 2025/10/10 1:05, Bart Van Assche 写道:
> 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, ...).

Yeah, sounds good. I'm still not used to this.

Thanks,
Kuai

>
> Thanks,
>
> Bart.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ