diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c index a409f0f0d1..ff26d1908c 100644 --- a/src/afs/afs_osi.c +++ b/src/afs/afs_osi.c @@ -807,6 +807,9 @@ afs_osi_TraverseProcTable(void) #endif #if defined(AFS_LINUX22_ENV) +#ifdef EXPORTED_TASKLIST_LOCK +extern rwlock_t tasklist_lock __attribute__((weak)); +#endif void afs_osi_TraverseProcTable() { @@ -814,8 +817,6 @@ afs_osi_TraverseProcTable() struct task_struct *p; #ifdef EXPORTED_TASKLIST_LOCK - extern rwlock_t tasklist_lock __attribute__((weak)); - if (&tasklist_lock) read_lock(&tasklist_lock); #endif