tasklist-lock-redux-20060922
[openafs.git] / src / afs / afs_osi_gcpags.c
index 3c8cfbb..c5df931 100644 (file)
@@ -233,6 +233,11 @@ afs_osi_TraverseProcTable()
     struct task_struct *p;
     if (&tasklist_lock)
        read_lock(&tasklist_lock);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+    else
+       rcu_read_lock();
+#endif
+
 #ifdef DEFINED_FOR_EACH_PROCESS
     for_each_process(p) if (p->pid) {
 #ifdef STRUCT_TASK_STRUCT_HAS_EXIT_STATE
@@ -258,6 +263,10 @@ afs_osi_TraverseProcTable()
 #endif
     if (&tasklist_lock)
        read_unlock(&tasklist_lock);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+    else
+       rcu_read_unlock();
+#endif
 }
 #endif