summaryrefslogtreecommitdiff
path: root/block/elevator.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-10-30 11:07:12 +0100
committerJens Axboe <axboe@kernel.dk>2022-11-01 08:02:47 -0600
commit2eef17a209ab4d77923222045d462d379d6ef692 (patch)
treef96524bf780da5f5c3bae7c5b01124e95114e42d /block/elevator.c
parent16095af2fa2c3089ff1162e677d6596772f6f478 (diff)
block: simplify the check for the current elevator in elv_iosched_show
Just compare the pointers instead of using the string based elevator_match. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20221030100714.876891-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 72346bf2f997..9a13d1959b76 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -792,7 +792,7 @@ ssize_t elv_iosched_show(struct request_queue *q, char *name)
spin_lock(&elv_list_lock);
list_for_each_entry(e, &elv_list, list) {
- if (cur && elevator_match(cur, e->elevator_name, 0)) {
+ if (e == cur) {
len += sprintf(name+len, "[%s] ", cur->elevator_name);
continue;
}