]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-conditionalize-tasklist-lock-20070226
authorStephan Wiesand <Stephan.Wiesand@desy.de>
Mon, 26 Feb 2007 17:57:40 +0000 (17:57 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 26 Feb 2007 17:57:40 +0000 (17:57 +0000)
FIXES 54922

make rx_knet use tasklist_lock conditionally also

(cherry picked from commit a3a40968308e9ef894df3756af7ccd7ed141c74f)

src/rx/LINUX/rx_knet.c

index 4b2720e4efce0fb5be0d553b13e4bb549fec5473..8587b0d0ac5f27066ae627d0bf6614bb6e032f04 100644 (file)
@@ -204,24 +204,34 @@ osi_NetReceive(osi_socket so, struct sockaddr_in *from, struct iovec *iov,
 
     return code;
 }
+#ifdef EXPORTED_TASKLIST_LOCK
 extern rwlock_t tasklist_lock __attribute__((weak));
+#endif
 void
 osi_StopListener(void)
 {
     struct task_struct *listener;
     extern int rxk_ListenerPid;
 
+#ifdef EXPORTED_TASKLIST_LOCK
     if (&tasklist_lock)
       read_lock(&tasklist_lock);
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+#ifdef EXPORTED_TASKLIST_LOCK
     else
+#endif
       rcu_read_lock();
 #endif
     listener = find_task_by_pid(rxk_ListenerPid);
+#ifdef EXPORTED_TASKLIST_LOCK
     if (&tasklist_lock)
        read_unlock(&tasklist_lock);
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+#ifdef EXPORTED_TASKLIST_LOCK
     else
+#endif
       rcu_read_unlock();
 #endif
     while (rxk_ListenerPid) {