mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 08:35:08 +08:00
block: replace continue with else-if in elv_iosched_show
else-if is more readable than continue here. Signed-off-by: Jinlong Chen <nickyc975@zju.edu.cn> Link: https://lore.kernel.org/r/77ac19ba556efd2c8639a6396eb4203c59bc13d6.1669736350.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
7919d679ae
commit
5998249e32
@ -776,11 +776,9 @@ ssize_t elv_iosched_show(struct request_queue *q, char *name)
|
|||||||
|
|
||||||
spin_lock(&elv_list_lock);
|
spin_lock(&elv_list_lock);
|
||||||
list_for_each_entry(e, &elv_list, list) {
|
list_for_each_entry(e, &elv_list, list) {
|
||||||
if (e == cur) {
|
if (e == cur)
|
||||||
len += sprintf(name+len, "[%s] ", cur->elevator_name);
|
len += sprintf(name+len, "[%s] ", cur->elevator_name);
|
||||||
continue;
|
else if (elv_support_features(q, e))
|
||||||
}
|
|
||||||
if (elv_support_features(q, e))
|
|
||||||
len += sprintf(name+len, "%s ", e->elevator_name);
|
len += sprintf(name+len, "%s ", e->elevator_name);
|
||||||
}
|
}
|
||||||
spin_unlock(&elv_list_lock);
|
spin_unlock(&elv_list_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user