diff options
author | Jinlong Chen <nickyc975@zju.edu.cn> | 2022-11-29 18:46:36 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-29 20:53:10 +0300 |
commit | 7a3b3660fd30c028e7ae1cd82697933789962406 (patch) | |
tree | e44083b411c3128dd7691873bd3adef69f0579a9 /block/elevator.c | |
parent | 5998249e3238428156b09911f1606b41113443c5 (diff) | |
download | linux-7a3b3660fd30c028e7ae1cd82697933789962406.tar.xz |
block: always use 'e' when printing scheduler name
Printing e->elevator_name in all cases improves the readability, and
'e' and 'cur' are identical in this branch.
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jinlong Chen <nickyc975@zju.edu.cn>
Link: https://lore.kernel.org/r/4bae180ffbac608ea0cf46ffa9739ce0973b60aa.1669736350.git.nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c index ffa750976d25..b2f2252f29e7 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -777,7 +777,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 (e == cur) - len += sprintf(name+len, "[%s] ", cur->elevator_name); + len += sprintf(name+len, "[%s] ", e->elevator_name); else if (elv_support_features(q, e)) len += sprintf(name+len, "%s ", e->elevator_name); } |