block/swim3: use set_current_state macro
Use set_current_state macro instead of current->state = TASK_RUNNING. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Родитель
8fd2b980a2
Коммит
c65165651d
|
@ -327,7 +327,7 @@ static inline void swim_motor(struct swim __iomem *base,
|
||||||
swim_select(base, RELAX);
|
swim_select(base, RELAX);
|
||||||
if (swim_readbit(base, MOTOR_ON))
|
if (swim_readbit(base, MOTOR_ON))
|
||||||
break;
|
break;
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
set_current_state(TASK_INTERRUPTIBLE);
|
||||||
schedule_timeout(1);
|
schedule_timeout(1);
|
||||||
}
|
}
|
||||||
} else if (action == OFF) {
|
} else if (action == OFF) {
|
||||||
|
@ -346,7 +346,7 @@ static inline void swim_eject(struct swim __iomem *base)
|
||||||
swim_select(base, RELAX);
|
swim_select(base, RELAX);
|
||||||
if (!swim_readbit(base, DISK_IN))
|
if (!swim_readbit(base, DISK_IN))
|
||||||
break;
|
break;
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
set_current_state(TASK_INTERRUPTIBLE);
|
||||||
schedule_timeout(1);
|
schedule_timeout(1);
|
||||||
}
|
}
|
||||||
swim_select(base, RELAX);
|
swim_select(base, RELAX);
|
||||||
|
@ -370,7 +370,7 @@ static inline int swim_step(struct swim __iomem *base)
|
||||||
|
|
||||||
for (wait = 0; wait < HZ; wait++) {
|
for (wait = 0; wait < HZ; wait++) {
|
||||||
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
set_current_state(TASK_INTERRUPTIBLE);
|
||||||
schedule_timeout(1);
|
schedule_timeout(1);
|
||||||
|
|
||||||
swim_select(base, RELAX);
|
swim_select(base, RELAX);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче