Commit 3fb4a251 authored by Patrick Caulfield's avatar Patrick Caulfield Committed by Steven Whitehouse

[DLM] Fix schedule() calls

I was a little over-enthusiastic turning schedule() calls int cond_sched() when fixing the DLM for Andrew Morton.

These four should really be calls to schedule() or the dlm can busy-wait.
Signed-Off-By: default avatarPatrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 5509826f
...@@ -1109,7 +1109,7 @@ static int dlm_recvd(void *data) ...@@ -1109,7 +1109,7 @@ static int dlm_recvd(void *data)
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&lowcomms_recv_wait, &wait); add_wait_queue(&lowcomms_recv_wait, &wait);
if (!test_bit(CF_READ_PENDING, &sctp_con.flags)) if (!test_bit(CF_READ_PENDING, &sctp_con.flags))
cond_resched(); schedule();
remove_wait_queue(&lowcomms_recv_wait, &wait); remove_wait_queue(&lowcomms_recv_wait, &wait);
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
...@@ -1141,7 +1141,7 @@ static int dlm_sendd(void *data) ...@@ -1141,7 +1141,7 @@ static int dlm_sendd(void *data)
while (!kthread_should_stop()) { while (!kthread_should_stop()) {
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
if (write_list_empty()) if (write_list_empty())
cond_resched(); schedule();
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
if (sctp_con.eagain_flag) { if (sctp_con.eagain_flag) {
......
...@@ -996,7 +996,7 @@ static int dlm_recvd(void *data) ...@@ -996,7 +996,7 @@ static int dlm_recvd(void *data)
while (!kthread_should_stop()) { while (!kthread_should_stop()) {
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
if (read_list_empty()) if (read_list_empty())
cond_resched(); schedule();
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
process_sockets(); process_sockets();
...@@ -1030,7 +1030,7 @@ static int dlm_sendd(void *data) ...@@ -1030,7 +1030,7 @@ static int dlm_sendd(void *data)
while (!kthread_should_stop()) { while (!kthread_should_stop()) {
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
if (write_and_state_lists_empty()) if (write_and_state_lists_empty())
cond_resched(); schedule();
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
process_state_queue(); process_state_queue();
......
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