Commit 13ba0403 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] reiserfs: remove final sleep_on

From: Chris Mason <mason@suse.com>

Get rid of the last sleep_on in the reiserfs code
parent f2a0b4d8
......@@ -2464,8 +2464,20 @@ void reiserfs_wait_on_write_block(struct super_block *s) {
}
static void queue_log_writer(struct super_block *s) {
wait_queue_t wait;
set_bit(WRITERS_QUEUED, &SB_JOURNAL(s)->j_state);
sleep_on(&SB_JOURNAL(s)->j_join_wait);
/*
* we don't want to use wait_event here because
* we only want to wait once.
*/
init_waitqueue_entry(&wait, current);
add_wait_queue(&SB_JOURNAL(s)->j_join_wait, &wait);
set_current_state(TASK_UNINTERRUPTIBLE);
if (test_bit(WRITERS_QUEUED, &SB_JOURNAL(s)->j_state))
schedule();
current->state = TASK_RUNNING;
remove_wait_queue(&SB_JOURNAL(s)->j_join_wait, &wait);
}
static void wake_queued_writers(struct super_block *s) {
......
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