summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXu Wang <vulab@iscas.ac.cn>2020-05-07 15:12:11 +0800
committerJens Axboe <axboe@kernel.dk>2020-05-16 14:28:37 -0600
commitc65165651d595fd77c38a9a25c14ade14444bc13 (patch)
treea36f44b9c2741ebf4d4587c0145bc2220ced0878
parent8fd2b980a298bc083e6067aefeb083f96c236a22 (diff)
downloadlinux-c65165651d595fd77c38a9a25c14ade14444bc13.tar.bz2
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>
-rw-r--r--drivers/block/swim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 4c297f69171d..dd34504382e5 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -327,7 +327,7 @@ static inline void swim_motor(struct swim __iomem *base,
swim_select(base, RELAX);
if (swim_readbit(base, MOTOR_ON))
break;
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
}
} else if (action == OFF) {
@@ -346,7 +346,7 @@ static inline void swim_eject(struct swim __iomem *base)
swim_select(base, RELAX);
if (!swim_readbit(base, DISK_IN))
break;
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
}
swim_select(base, RELAX);
@@ -370,7 +370,7 @@ static inline int swim_step(struct swim __iomem *base)
for (wait = 0; wait < HZ; wait++) {
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
swim_select(base, RELAX);