aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2022-10-30 11:07:12 +0100
committerJens Axboe <[email protected]>2022-11-01 08:02:47 -0600
commit2eef17a209ab4d77923222045d462d379d6ef692 (patch)
treef96524bf780da5f5c3bae7c5b01124e95114e42d
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
-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;
}