[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1b4889f3-3140-4855-8c74-f0c9df7318ca@kernel.dk>
Date: Fri, 11 Oct 2024 07:12:43 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Christoph Hellwig <hch@...radead.org>, Breno Leitao <leitao@...ian.org>
Cc: kernel-team@...a.com, "open list:BLOCK LAYER"
<linux-block@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] elevator: do not request_module if elevator exists
On 10/11/24 2:24 AM, Christoph Hellwig wrote:
>> diff --git a/block/elevator.c b/block/elevator.c
>> index 4122026b11f1..1904e217505a 100644
>> --- a/block/elevator.c
>> +++ b/block/elevator.c
>> @@ -709,13 +709,16 @@ int elv_iosched_load_module(struct gendisk *disk, const char *buf,
>> size_t count)
>> {
>> char elevator_name[ELV_NAME_MAX];
>> + const char *name;
>>
>> if (!elv_support_iosched(disk->queue))
>> return -EOPNOTSUPP;
>>
>> strscpy(elevator_name, buf, sizeof(elevator_name));
>> + name = strstrip(elevator_name);
>>
>> - request_module("%s-iosched", strstrip(elevator_name));
>> + if (!__elevator_find(name))
>
> __elevator_find needs to be called with elv_list_lock.
Doh yes. Breno, I just dropped it for now, just send a v2.
--
Jens Axboe
Powered by blists - more mailing lists