From 6ecd2377d9c902737597ce83cdfde19be4c8512a Mon Sep 17 00:00:00 2001 From: Krzysztof Mazur Date: Sat, 4 Feb 2012 09:16:09 +0100 Subject: [PATCH 56/84] lsbd: cleanup task state modification Now all task state changes are performed by __set_current_task(). Signed-off-by: Krzysztof Mazur --- drivers/block/lsbd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/block/lsbd.c b/drivers/block/lsbd.c index 6efa961..87b73e9 100644 --- a/drivers/block/lsbd.c +++ b/drivers/block/lsbd.c @@ -286,7 +286,7 @@ static struct buffer_head *__lsbd_get_buffer(struct lsbd *p) break; run_task_queue(&tq_disk); - set_current_state(TASK_INTERRUPTIBLE); + __set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ / 10); } while (1); memset(bh, 0, sizeof(*bh)); @@ -314,7 +314,7 @@ static struct buffer_head *lsbd_get_buffer(struct lsbd *p) break; run_task_queue(&tq_disk); - set_current_state(TASK_INTERRUPTIBLE); + __set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ / 10); } while (1); memset(bh, 0, sizeof(*bh)); @@ -2303,7 +2303,7 @@ static int lsbd_thread(void *data) want_clean = 0; add_wait_queue(&p->wqueue_wait, &wait); - set_task_state(current, TASK_INTERRUPTIBLE); + __set_current_state(TASK_INTERRUPTIBLE); spin_lock_irq(&p->wqueue_lock); if (p->wqueue_len || p->blocks_to_write) @@ -2312,7 +2312,7 @@ static int lsbd_thread(void *data) want_clean = (lsbd_clean_blocks(p) < LSBD_CLEAN_WINDOW); if (!(want_write || want_clean || p->stop)) schedule(); - current->state = TASK_RUNNING; + __set_current_state(TASK_RUNNING); remove_wait_queue(&p->wqueue_wait, &wait); lsbd_debug(p, "lsbd_thread: %s %s: clean: %d/%d\n", -- 1.8.4.652.g0d6e0ce