Re: [PATCH] elevator: do not request_module if elevator exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux