patch for linux kernel 2.3.2

Hee-Seok Heo hsheo at postech.ac.kr
Sun May 16 03:15:49 CEST 1999



--
Heeseok Heo PhD St POSTECH




--- arla-0.23/xfs/linux/xfs_dev.c	Sun Mar 28 23:14:07 1999
+++ arla-0.23-new/xfs/linux/xfs_dev.c	Sun May 16 08:04:22 1999
@@ -62,14 +62,14 @@
     struct xfs_link *prev, *next;
     struct xfs_message_header *message;
     u_int error_or_size;	/* error on sleepq and size on messageq */
-    struct wait_queue *wait_queue;
+    wait_queue_head_t wait_queue;
 };  
 
 struct xfs_channel {
     struct xfs_link messageq;	/* Messages not yet read */
     struct xfs_link sleepq;	/* Waiting for reply message */
     u_int nsequence;
-    struct wait_queue *wait_queue;
+    wait_queue_head_t wait_queue;
     struct xfs_message_header *message_buffer;
     int status;
 #define CHANNEL_OPENED	0x1
@@ -83,7 +83,7 @@
 {
     q->next = q;
     q->prev = q;
-    q->wait_queue = NULL;
+    init_waitqueue_head(&(q->wait_queue));
 }
 
 /* Is this queue empty? */
@@ -407,10 +407,9 @@
     t->this_message.message = &t->msg;
     down(&chan->channel_sem);
     xfs_appendq(&chan->messageq, &t->this_message);
-    t->this_message.wait_queue = NULL;
+    init_waitqueue_head(&(t->this_message.wait_queue));
     up(&chan->channel_sem);
-    if ( chan->wait_queue )
-	wake_up(&chan->wait_queue);
+    wake_up(&chan->wait_queue);
     return 0;
 }
 
@@ -447,8 +446,8 @@
     XFSDEB(XDEBMSG, ("xfs_message_rpc seq = %d\n", msg->sequence_num));
     this_message->error_or_size = 0;
     
-    this_message->wait_queue = NULL;
-    this_process->wait_queue = NULL;
+    init_waitqueue_head(&(this_message->wait_queue));
+    init_waitqueue_head(&(this_process->wait_queue));
     
     this_message->message = msg; /* message;*/
     this_process->message = msg; /* message; */
@@ -460,8 +459,7 @@
     
     up(&chan->channel_sem);
     
-    if ( chan->wait_queue )
-	wake_up(&chan->wait_queue);
+    wake_up(&chan->wait_queue);
     
 #ifdef LINUX2_1
     spin_lock_irq(&current->sigmask_lock);
@@ -603,8 +601,7 @@
 		else
 		    t->error_or_size = -message->error;
 	    }
-	    if (t->wait_queue)
-		wake_up(&t->wait_queue);
+	    wake_up(&t->wait_queue);
 	    break;
 	}
     up(&chan->channel_sem);
@@ -636,8 +633,7 @@
 		else
 		    t->error_or_size = -message->error;
 	    }
-	    if (t->wait_queue)
-		wake_up(&t->wait_queue);
+	    wake_up(&t->wait_queue);
 	    break;
 	}
     up(&chan->channel_sem);
@@ -671,10 +667,10 @@
     
     for (i = 0; i < NXFS; i++) {
 	XFSDEB(XDEBDEV, ("before initq(messageq and sleepq)\n"));
-	xfs_channel[i].wait_queue = NULL;
+	init_waitqueue_head(&(xfs_channel[i].wait_queue));
 	xfs_initq(&xfs_channel[i].messageq);
 	xfs_initq(&xfs_channel[i].sleepq);
-	xfs_channel[i].channel_sem = MUTEX;
+	init_MUTEX(&(xfs_channel[i].channel_sem));
     }
     return 0;
 }
--- arla-0.23/xfs/linux/xfs_inodeops.c	Sun Mar 28 23:14:08 1999
+++ arla-0.23-new/xfs/linux/xfs_inodeops.c	Sun May 16 07:59:20 1999
@@ -466,13 +466,9 @@
 void
 xfs_print_lock(char *s, struct semaphore *sem)
 {
-    XFSDEB(XDEBLOCK, ("lock: %s sem: %p count: %d waking: %d wait: %p",
+    XFSDEB(XDEBLOCK, ("lock: %s sem: %p count: %d waking: %d",
 		      s, sem, atomic_read(&sem->count),
-		      sem->waking, sem->wait));
-    if (sem->wait) {
-	XFSDEB(XDEBLOCK, (" task: %p next: %p",
-			  sem->wait->task, sem->wait->next));
-    }
+		      sem->waking));
     XFSDEB(XDEBLOCK, ("\n"));
 }
 





More information about the Arla-drinkers mailing list