[Ocfs2-commits] mfasheh commits r834 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Apr 2 12:54:32 CST 2004


Author: mfasheh
Date: 2004-04-02 12:54:30 -0600 (Fri, 02 Apr 2004)
New Revision: 834

Modified:
   trunk/src/nm.c
Log:
* handle signals properly in volume_thread.


Modified: trunk/src/nm.c
===================================================================
--- trunk/src/nm.c	2004-04-01 20:33:38 UTC (rev 833)
+++ trunk/src/nm.c	2004-04-02 18:54:30 UTC (rev 834)
@@ -254,6 +254,7 @@
 	__u64 cfg_seq_num;
 	int which, pruned, prune_iters = 0;
 	struct buffer_head *bh = NULL;
+	siginfo_t info;
 
 	LOG_ENTRY ();
 
@@ -444,6 +445,24 @@
 		}
 		set_current_state (TASK_INTERRUPTIBLE);
 		schedule_timeout (osb->hbt - j);
+		/* this should all just be in some common function as
+		 * it's totally duplicated. */
+		if (signal_pending(current)) {
+			/* ignore the actual signal */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+			dequeue_signal_lock(urrent, &current->blocked, &info);
+#else
+#ifdef HAVE_NPTL
+			spin_lock_irq (&current->sighand->siglock);
+			dequeue_signal(&current->blocked, &info);
+			spin_unlock_irq(&current->sighand->siglock);
+#else 
+			spin_lock_irq(&current->sigmask_lock);
+			dequeue_signal(&current->blocked, &info);
+			spin_unlock_irq(&current->sigmask_lock);
+#endif /* !HAVE_NPTL */
+#endif /* 2.4.x kernel */
+		}
 	}
 
         /* Flush all scheduled tasks */



More information about the Ocfs2-commits mailing list