Skip to content

Commit

Permalink
block: simplify the check for the current elevator in elv_iosched_show
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and axboe committed Nov 1, 2022
1 parent 16095af commit 2eef17a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2eef17a

Please sign in to comment.