]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
linux-mutex-changes-20060812
authorJason McCormick <jasonmc@cert.org>
Sat, 12 Aug 2006 17:50:37 +0000 (17:50 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sat, 12 Aug 2006 17:50:37 +0000 (17:50 +0000)
update mutex declarations

src/afs/LINUX/osi_alloc.c
src/afs/LINUX/osi_cred.c
src/afs/LINUX/osi_pag_module.c

index 23994d07b8416ba6b5d84cb604dd7546fa418f9f..24dd1f77aab8b66f8848a30cda3a1febf6272dd8 100644 (file)
@@ -282,7 +282,11 @@ get_hash_stats()
 /************** Linux memory allocator interface functions **********/
 
 #if defined(AFS_LINUX24_ENV)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+DEFINE_MUTEX(afs_linux_alloc_sem);
+#else
 DECLARE_MUTEX(afs_linux_alloc_sem);
+#endif
 #else
 struct semaphore afs_linux_alloc_sem = MUTEX;
 #endif
index a8f806c56c0244e5351729bfae4ff5b373a0b718..612e4f00de0ac3e98c55e65786814b961843ecf3 100644 (file)
@@ -33,7 +33,11 @@ int ncreds_inuse = 0;
  * test if no creds in pool before grabbing lock in crfree().
  */
 #if defined(AFS_LINUX24_ENV)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+static DEFINE_MUTEX(linux_cred_pool_lock);
+#else
 static DECLARE_MUTEX(linux_cred_pool_lock);
+#endif
 #else
 static struct semaphore linux_cred_pool_lock = MUTEX;
 #endif
index ecfebaa3cff20c9719809773cef6c33de6a55053..f02f3605472da0fb8e72a2b41f2c28e027f72ebf 100644 (file)
@@ -55,7 +55,11 @@ MODULE_PARM(this_cell, "s");
 MODULE_PARM_DESC(this_cell, "Local cell name");
 
 #if defined(AFS_LINUX24_ENV)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+DEFINE_MUTEX(afs_global_lock);
+#else
 DECLARE_MUTEX(afs_global_lock);
+#endif
 struct proc_dir_entry *openafs_procfs;
 #else
 struct semaphore afs_global_lock = MUTEX;