All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: [PATCH 1/7] block: drop the duplicate check in elv_register
Date: Sun, 30 Oct 2022 11:07:08 +0100	[thread overview]
Message-ID: <20221030100714.876891-2-hch@lst.de> (raw)
In-Reply-To: <20221030100714.876891-1-hch@lst.de>

We have less than a handful of elevators, and if someone adds a duplicate
one it simply will never be found but other be harmless.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/elevator.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/block/elevator.c b/block/elevator.c
index d26aa787e29f0..ef9af17293ffb 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -545,13 +545,7 @@ int elv_register(struct elevator_type *e)
 			return -ENOMEM;
 	}
 
-	/* register, don't allow duplicate names */
 	spin_lock(&elv_list_lock);
-	if (elevator_find(e->elevator_name, 0)) {
-		spin_unlock(&elv_list_lock);
-		kmem_cache_destroy(e->icq_cache);
-		return -EBUSY;
-	}
 	list_add_tail(&e->list, &elv_list);
 	spin_unlock(&elv_list_lock);
 
-- 
2.30.2


  reply	other threads:[~2022-10-30 10:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30 10:07 misc elevator code cleanups Christoph Hellwig
2022-10-30 10:07 ` Christoph Hellwig [this message]
2022-10-31 13:50   ` [PATCH 1/7] block: drop the duplicate check in elv_register Jens Axboe
2022-11-01 10:02     ` Christoph Hellwig
2022-10-30 10:07 ` [PATCH 2/7] block: cleanup elevator_get Christoph Hellwig
2022-10-30 10:07 ` [PATCH 3/7] block: exit elv_iosched_show early when I/O schedulers are not supported Christoph Hellwig
2022-10-30 10:07 ` [PATCH 4/7] block: cleanup the variable naming in elv_iosched_store Christoph Hellwig
2022-10-30 10:07 ` [PATCH 5/7] block: simplify the check for the current elevator in elv_iosched_show Christoph Hellwig
2022-10-30 10:07 ` [PATCH 6/7] block: don't check for required features in elevator_match Christoph Hellwig
2022-10-30 10:07 ` [PATCH 7/7] block: split elevator_switch Christoph Hellwig
2022-10-30 14:03 ` misc elevator code cleanups Jinlong Chen
2022-10-30 15:32   ` Christoph Hellwig
2022-10-31  1:49     ` Jinlong Chen
2022-11-01 14:03 ` (subset) " Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221030100714.876891-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.