Whamcloud - gitweb
- Fix build with rh 2.4.20 kernel series
authorjacob <jacob>
Fri, 8 Aug 2003 20:10:29 +0000 (20:10 +0000)
committerjacob <jacob>
Fri, 8 Aug 2003 20:10:29 +0000 (20:10 +0000)
r=phil
b=1663

lnet/include/linux/portals_compat25.h
lustre/include/linux/lustre_compat25.h
lustre/portals/include/linux/portals_compat25.h

index a7cb4d1..4361858 100644 (file)
@@ -18,7 +18,7 @@
 #endif
 // XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
 
 # define SIGNAL_MASK_LOCK(task, flags)                                  \
   spin_lock_irqsave(&task->sighand->siglock, flags)
 # define RECALC_SIGPENDING         recalc_sigpending()
 # define CURRENT_SECONDS           get_seconds()
 
+#elif defined(CONFIG_RH_2_4_20) /* RH 2.4.x */
+
+# define SIGNAL_MASK_LOCK(task, flags)                                  \
+  spin_lock_irqsave(&task->sighand->siglock, flags)
+# define SIGNAL_MASK_UNLOCK(task, flags)                                \
+  spin_unlock_irqrestore(&task->sighand->siglock, flags)
+# define USERMODEHELPER(path, argv, envp)                               \
+  call_usermodehelper(path, argv, envp)
+# define RECALC_SIGPENDING         recalc_sigpending()
+# define CURRENT_SECONDS           CURRENT_TIME
+
 #else /* 2.4.x */
 
 # define SIGNAL_MASK_LOCK(task, flags)                                  \
index 3609d52..a142e9b 100644 (file)
@@ -37,8 +37,6 @@
 
 #define KDEVT_INIT(val)                 { .value = val }
 #define LTIME_S(time)                   (time.tv_sec)
-#define USERMODEHELPER(path, argv, envp) \
-                                        call_usermodehelper(path, argv, envp, 1)
 #define ll_path_lookup                  path_lookup
 
 
@@ -68,8 +66,7 @@
 #ifndef CONFIG_RH_2_4_20
 #define cpu_online(cpu)                 (cpu_online_map & (1<<cpu))
 #endif
-#define USERMODEHELPER(path, argv, envp) \
-                                        call_usermodehelper(path, argv, envp)
+
 static inline int ll_path_lookup(const char *path, unsigned flags, 
                               struct nameidata *nd)
 {
index a7cb4d1..4361858 100644 (file)
@@ -18,7 +18,7 @@
 #endif
 // XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
 
 # define SIGNAL_MASK_LOCK(task, flags)                                  \
   spin_lock_irqsave(&task->sighand->siglock, flags)
 # define RECALC_SIGPENDING         recalc_sigpending()
 # define CURRENT_SECONDS           get_seconds()
 
+#elif defined(CONFIG_RH_2_4_20) /* RH 2.4.x */
+
+# define SIGNAL_MASK_LOCK(task, flags)                                  \
+  spin_lock_irqsave(&task->sighand->siglock, flags)
+# define SIGNAL_MASK_UNLOCK(task, flags)                                \
+  spin_unlock_irqrestore(&task->sighand->siglock, flags)
+# define USERMODEHELPER(path, argv, envp)                               \
+  call_usermodehelper(path, argv, envp)
+# define RECALC_SIGPENDING         recalc_sigpending()
+# define CURRENT_SECONDS           CURRENT_TIME
+
 #else /* 2.4.x */
 
 # define SIGNAL_MASK_LOCK(task, flags)                                  \