Skip to content

Commit

Permalink
[DLM] Fix schedule() calls
Browse files Browse the repository at this point in the history
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: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Patrick Caulfield authored and Steven Whitehouse committed Feb 5, 2007
1 parent 5509826 commit 3fb4a25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fs/dlm/lowcomms-sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ static int dlm_recvd(void *data)
set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&lowcomms_recv_wait, &wait);
if (!test_bit(CF_READ_PENDING, &sctp_con.flags))
cond_resched();
schedule();
remove_wait_queue(&lowcomms_recv_wait, &wait);
set_current_state(TASK_RUNNING);

Expand Down Expand Up @@ -1141,7 +1141,7 @@ static int dlm_sendd(void *data)
while (!kthread_should_stop()) {
set_current_state(TASK_INTERRUPTIBLE);
if (write_list_empty())
cond_resched();
schedule();
set_current_state(TASK_RUNNING);

if (sctp_con.eagain_flag) {
Expand Down
4 changes: 2 additions & 2 deletions fs/dlm/lowcomms-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ static int dlm_recvd(void *data)
while (!kthread_should_stop()) {
set_current_state(TASK_INTERRUPTIBLE);
if (read_list_empty())
cond_resched();
schedule();
set_current_state(TASK_RUNNING);

process_sockets();
Expand Down Expand Up @@ -1030,7 +1030,7 @@ static int dlm_sendd(void *data)
while (!kthread_should_stop()) {
set_current_state(TASK_INTERRUPTIBLE);
if (write_and_state_lists_empty())
cond_resched();
schedule();
set_current_state(TASK_RUNNING);

process_state_queue();
Expand Down

0 comments on commit 3fb4a25

Please sign in to comment.