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@xxxxxx> --- 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