Commit 55b31e11 authored by Andrew Morton's avatar Andrew Morton Committed by Dave Jones

[PATCH] use set_current_state in fs

Patch from Robert Love <rml@tech9.net>

This patch is by Inaky Perez-Gonzalez.

There are a couple uses of 'p->state=foo' in fs/ which are open coded.
This patch converts them to the proper [__]set_current_state() function.
parent bb8c9453
...@@ -633,7 +633,7 @@ static inline int de_thread(struct task_struct *tsk) ...@@ -633,7 +633,7 @@ static inline int de_thread(struct task_struct *tsk)
count = 1; count = 1;
while (atomic_read(&oldsig->count) > count) { while (atomic_read(&oldsig->count) > count) {
oldsig->group_exit_task = current; oldsig->group_exit_task = current;
current->state = TASK_UNINTERRUPTIBLE; __set_current_state(TASK_UNINTERRUPTIBLE);
spin_unlock_irq(lock); spin_unlock_irq(lock);
schedule(); schedule();
spin_lock_irq(lock); spin_lock_irq(lock);
......
...@@ -1214,7 +1214,7 @@ void __wait_on_inode(struct inode *inode) ...@@ -1214,7 +1214,7 @@ void __wait_on_inode(struct inode *inode)
goto repeat; goto repeat;
} }
remove_wait_queue(wq, &wait); remove_wait_queue(wq, &wait);
current->state = TASK_RUNNING; __set_current_state(TASK_RUNNING);
} }
void wake_up_inode(struct inode *inode) void wake_up_inode(struct inode *inode)
......
...@@ -565,7 +565,7 @@ static int interruptible_sleep_on_locked(wait_queue_head_t *fl_wait, int timeout ...@@ -565,7 +565,7 @@ static int interruptible_sleep_on_locked(wait_queue_head_t *fl_wait, int timeout
int result = 0; int result = 0;
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
current->state = TASK_INTERRUPTIBLE; __set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(fl_wait, &wait); add_wait_queue(fl_wait, &wait);
if (timeout == 0) if (timeout == 0)
schedule(); schedule();
...@@ -574,7 +574,7 @@ static int interruptible_sleep_on_locked(wait_queue_head_t *fl_wait, int timeout ...@@ -574,7 +574,7 @@ static int interruptible_sleep_on_locked(wait_queue_head_t *fl_wait, int timeout
if (signal_pending(current)) if (signal_pending(current))
result = -ERESTARTSYS; result = -ERESTARTSYS;
remove_wait_queue(fl_wait, &wait); remove_wait_queue(fl_wait, &wait);
current->state = TASK_RUNNING; __set_current_state(TASK_RUNNING);
return result; return result;
} }
......
...@@ -235,7 +235,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout) ...@@ -235,7 +235,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
} }
__timeout = schedule_timeout(__timeout); __timeout = schedule_timeout(__timeout);
} }
current->state = TASK_RUNNING; __set_current_state(TASK_RUNNING);
poll_freewait(&table); poll_freewait(&table);
...@@ -425,7 +425,7 @@ static int do_poll(unsigned int nfds, struct poll_list *list, ...@@ -425,7 +425,7 @@ static int do_poll(unsigned int nfds, struct poll_list *list,
break; break;
timeout = schedule_timeout(timeout); timeout = schedule_timeout(timeout);
} }
current->state = TASK_RUNNING; __set_current_state(TASK_RUNNING);
return count; return count;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment