provide dequeue_signal_lock for 2.4
PATCH 1/1 provide dequeue_signal_lock for 2.4
(vs format-changes branch)
journal.c +5 -18
@@ -1594,26 +1594,13 @@* one last commit cache and then exit */ if (journal->state ==OCFS_JOURNAL_IN_SHUTDOWN ) finish =1 ; + +/* ignore the actual signal */ if (signal_pending (current)) { -/* ignore the actual signal */ -#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,0 ) -dequeue_signal_lock (current, - ¤t->blocked, - &info); -#else -#ifdef HAVE_NPTL -spin_lock_irq (¤t->sighand->siglock); -dequeue_signal (¤t->blocked, - &info); -spin_unlock_irq (¤t->sighand->siglock); -#else -spin_lock_irq (¤t->sigmask_lock); -dequeue_signal (¤t->blocked, - &info); -spin_unlock_irq (¤t->sigmask_lock); -#endif /* !HAVE_NPTL */ -#endif /* 2.4.x kernel */ +dequeue_signal_lock (current, + ¤t->blocked, &info); } +LOG_TRACE_STR ("FLUSH_EVENT: interrupted" );break ;case 0 :
nm.c +5 -34
@@ -461,24 +461,10 @@ }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 ) + +/* ignore the actual signal */ +if (signal_pending (current))dequeue_signal_lock (current, ¤t->blocked, &info); -#else -#ifdef HAVE_NPTL -spin_lock_irq (¤t->sighand->siglock); -dequeue_signal (¤t->blocked, &info); -spin_unlock_irq (¤t->sighand->siglock); -#else -spin_lock_irq (¤t->sigmask_lock); -dequeue_signal (¤t->blocked, &info); -spin_unlock_irq (¤t->sigmask_lock); -#endif /* !HAVE_NPTL */ -#endif /* 2.4.x kernel */ - } }/* Flush all scheduled tasks */
@@ -1434,24 +1420,9 @@ocfs_daemonize (OCFS_DROP_RO_THREAD_NAME ,strlen (OCFS_DROP_RO_THREAD_NAME )); status =_ocfs_drop_readonly_cache_lock (arg); -/* 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 ) +/* ignore the actual signal */ +if (signal_pending (current))dequeue_signal_lock (current, ¤t->blocked, &info); -#else -#ifdef HAVE_NPTL -spin_lock_irq (¤t->sighand->siglock); -dequeue_signal (¤t->blocked, &info); -spin_unlock_irq (¤t->sighand->siglock); -#else -spin_lock_irq (¤t->sigmask_lock); -dequeue_signal (¤t->blocked, &info); -spin_unlock_irq (¤t->sigmask_lock); -#endif /* !HAVE_NPTL */ -#endif /* 2.4.x kernel */ - }/* Flush all scheduled tasks */ #if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,0 )
inc/ocfs_compat.h +18 -0
@@ -31,6 +31,24 @@#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,0 ) +#ifdef HAVE_NPTL +static inline void dequeue_signal_lock (struct task_struct *task, +sigset_t *blocked,siginfo_t *info) +{ +spin_lock_irq (&task->sighand->siglock); +dequeue_signal (blocked, info); +spin_unlock_irq (&task->sighand->siglock); +} +#else +static inline void dequeue_signal_lock (struct task_struct *task, +sigset_t *blocked,siginfo_t *info) +{ +spin_lock_irq (&task->sigmask_lock); +dequeue_signal (blocked, info); +spin_unlock_irq (&task->sigmask_lock); +} +#endif +#ifdef __ia64__extern inline void prefetch (const void *x);extern inline void prefetchw (const void *x);