[OpenAFS-devel] [PATCH] correct Linux kernel client lock initialisation
David Howells
dhowells@warthog.cambridge.redhat.com
Wed, 18 Sep 2002 16:01:56 +0100
Attached is a small patch to initialise some kernel spinlocks properly.
David
diff -uNr openafs-1.2.5/src/afs/afs_init.c openafs-debug/src/afs/afs_init.c
--- openafs-1.2.5/src/afs/afs_init.c Wed Jul 24 10:41:06 2002
+++ openafs-debug/src/afs/afs_init.c Wed Jul 24 10:41:18 2002
@@ -39,6 +39,8 @@
extern afs_rwlock_t afs_xvolume;
extern afs_rwlock_t afs_xuser;
extern afs_rwlock_t afs_xserver;
+extern afs_rwlock_t afs_xsrvAddr;
+extern afs_rwlock_t afs_icl_lock;
#ifndef AFS_AIX41_ENV
extern afs_lock_t osi_fsplock;
#endif
@@ -517,6 +519,8 @@
RWLOCK_INIT(&afs_xvolume, "afs_xvolume");
RWLOCK_INIT(&afs_xcell, "afs_xcell");
RWLOCK_INIT(&afs_xserver, "afs_xserver");
+ RWLOCK_INIT(&afs_xsrvAddr, "afs_xsrvAddr");
+ RWLOCK_INIT(&afs_icl_lock, "afs_icl_lock");
RWLOCK_INIT(&afs_xinterface, "afs_xinterface");
LOCK_INIT(&afs_puttofileLock, "afs_puttofileLock");
#ifndef AFS_AIX32_ENV
diff -uNr openafs-1.2.5/src/afs/LINUX/osi_module.c openafs-debug/src/afs/LINUX/osi_module.c
--- openafs-1.2.5/src/afs/LINUX/osi_module.c Thu Jul 25 15:49:38 2002
+++ openafs-debug/src/afs/LINUX/osi_module.c Thu Jul 25 15:50:48 2002
@@ -66,6 +66,7 @@
#endif
int afs_global_owner = 0;
unsigned long afs_linux_page_offset = 0; /* contains the PAGE_OFFSET value */
+extern afs_rwlock_t afs_xosi;
/* Since sys_ni_syscall is not exported, I need to cache it in order to restore
* it.
@@ -210,6 +211,7 @@
#endif
#endif
+ RWLOCK_INIT(&afs_xosi, "afs_xosi");
/* obtain PAGE_OFFSET value */