]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[DLM] Fix schedule() calls
authorPatrick Caulfield <pcaulfie@redhat.com>
Tue, 2 Jan 2007 17:01:05 +0000 (17:01 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 5 Feb 2007 18:36:18 +0000 (13:36 -0500)
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>
fs/dlm/lowcomms-sctp.c
fs/dlm/lowcomms-tcp.c

index fe158d7a92853074da36daa33dcbcbabaae00ec7..0940a805b3d730fa9f768f0d8039b7e4ed92b430 100644 (file)
@@ -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);
 
@@ -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) {
index 3b224733f18be4bc3a435b6cbc1ad9c61f75e856..18b91c65bdb3156a58a2435311c0b27fc98fa9f7 100644 (file)
@@ -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();
@@ -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();