Commit 6ba3988a authored by Nathan Scott's avatar Nathan Scott

[XFS] Use set_current_state instead of direct current->state assignment.

SGI Modid: xfs-linux:xfs-kern:172042a
parent a734b95c
...@@ -39,7 +39,7 @@ typedef struct timespec timespec_t; ...@@ -39,7 +39,7 @@ typedef struct timespec timespec_t;
static inline void delay(long ticks) static inline void delay(long ticks)
{ {
current->state = TASK_UNINTERRUPTIBLE; set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(ticks); schedule_timeout(ticks);
} }
......
...@@ -386,7 +386,7 @@ _pagebuf_lookup_pages( ...@@ -386,7 +386,7 @@ _pagebuf_lookup_pages(
XFS_STATS_INC(pb_page_retries); XFS_STATS_INC(pb_page_retries);
pagebuf_daemon_wakeup(); pagebuf_daemon_wakeup();
current->state = TASK_UNINTERRUPTIBLE; set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(10); schedule_timeout(10);
goto retry; goto retry;
} }
...@@ -1061,7 +1061,7 @@ _pagebuf_wait_unpin( ...@@ -1061,7 +1061,7 @@ _pagebuf_wait_unpin(
add_wait_queue(&pb->pb_waiters, &wait); add_wait_queue(&pb->pb_waiters, &wait);
for (;;) { for (;;) {
current->state = TASK_UNINTERRUPTIBLE; set_current_state(TASK_UNINTERRUPTIBLE);
if (atomic_read(&pb->pb_pin_count) == 0) if (atomic_read(&pb->pb_pin_count) == 0)
break; break;
if (atomic_read(&pb->pb_io_remaining)) if (atomic_read(&pb->pb_io_remaining))
...@@ -1069,7 +1069,7 @@ _pagebuf_wait_unpin( ...@@ -1069,7 +1069,7 @@ _pagebuf_wait_unpin(
schedule(); schedule();
} }
remove_wait_queue(&pb->pb_waiters, &wait); remove_wait_queue(&pb->pb_waiters, &wait);
current->state = TASK_RUNNING; set_current_state(TASK_RUNNING);
} }
/* /*
......
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