[Ocfs2-commits] mfasheh commits r1667 - branches/dlm-glue/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Nov 23 12:39:31 CST 2004


Author: mfasheh
Date: 2004-11-23 12:39:29 -0600 (Tue, 23 Nov 2004)
New Revision: 1667

Modified:
   branches/dlm-glue/src/vote.c
Log:
* some cleanups in vote.c, thanks to zab for pointing these out.



Modified: branches/dlm-glue/src/vote.c
===================================================================
--- branches/dlm-glue/src/vote.c	2004-11-23 18:36:58 UTC (rev 1666)
+++ branches/dlm-glue/src/vote.c	2004-11-23 18:39:29 UTC (rev 1667)
@@ -454,8 +454,7 @@
 {
 	int status = 0;
 	signed long timeout = OCFS2_RESPONSE_WAIT_JIFFIES;
-	wait_queue_t wait;
-	init_waitqueue_entry(&wait, current);
+	DECLARE_WAITQUEUE(wait, current);
 
 	add_wait_queue(&w->n_event, &wait);
 	while (1) {
@@ -475,7 +474,7 @@
 		status = -ERESTARTSYS;
 		break;
 	}
-	current->state = TASK_RUNNING;
+	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&w->n_event, &wait);
 
 	return status;
@@ -733,7 +732,6 @@
 	spin_lock(&osb->net_response_lock);
 	w = __ocfs2_find_net_wait_ctxt(osb, response_id);
 	if (!w) {
-		spin_unlock(&osb->net_response_lock);
 		printk("request not found!\n");
 		goto bail;
 	}
@@ -747,9 +745,9 @@
 	ocfs_node_map_clear_bit(osb, &w->n_node_map, node_num);
 	if (ocfs_node_map_is_empty(osb, &w->n_node_map))
 		wake_up_all(&w->n_event);
+bail:
 	spin_unlock(&osb->net_response_lock);
 
-bail:
 	return 0;
 }
 



More information about the Ocfs2-commits mailing list