提交 2eef17a2 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

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: NChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20221030100714.876891-6-hch@lst.deSigned-off-by: NJens Axboe <axboe@kernel.dk>
上级 16095af2
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册