[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241011-enigmatic-mustang-of-thunder-eae0d3@leitao>
Date: Fri, 11 Oct 2024 06:17:26 -0700
From: Breno Leitao <leitao@...ian.org>
To: Jens Axboe <axboe@...nel.dk>
Cc: Christoph Hellwig <hch@...radead.org>, 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
Hello Jens,
On Fri, Oct 11, 2024 at 07:12:43AM -0600, Jens Axboe wrote:
> 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.
Sure, I will be sending soon. Sorry for not finding it earlier.
Powered by blists - more mailing lists