]> www.infradead.org Git - users/hch/block.git/commitdiff
block: simplify the check for the current elevator in elv_iosched_show
authorChristoph Hellwig <hch@lst.de>
Tue, 25 Oct 2022 19:02:37 +0000 (12:02 -0700)
committerChristoph Hellwig <hch@lst.de>
Tue, 25 Oct 2022 19:11:50 +0000 (12:11 -0700)
Just compare the pointers instead of using the string based
elevator_match.

Signed-off-by: Christoph Hellwig <hch@lst.de>
block/elevator.c

index 4fc0d2f5392957476c6cace37f8f6d669721399b..77c16c5ef04ff6f553c0a90487f8ae5931e26f4b 100644 (file)
@@ -786,7 +786,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;
                }