[OpenAFS] Linux kernel panic, OpenAFS client, gconf

chas williams (contractor) chas@cmf.nrl.navy.mil
Thu, 17 Jun 2004 11:14:49 -0400


>applied a patch from Chas Williams for osi_vnodeops.c, but it is almost the
>same. The Situation is improved sofar that in some cases afsd seems to hang
>and the applications produce very high load, because they can't access afs.

which patch?  the following seemed to help my gconf related crashes.

--- openafs-1.2.11.orig/src/afs/LINUX/osi_vnodeops.c	2003-01-16 20:30:37.000000000 -0500
+++ openafs-1.2.11/src/afs/LINUX/osi_vnodeops.c	2004-06-02 11:55:05.000000000 -0400
@@ -749,12 +749,15 @@
     struct vcache *lookupvcp = NULL;
     int code, bad_dentry = 1;
     struct sysname_info sysState;
-    struct vcache *vcp = ITOAFS(dp->d_inode);
-    struct vcache *parentvcp = ITOAFS(dp->d_parent->d_inode);
+    struct vcache *vcp, *parentvcp;
+
+    sysState.allocked = 0;
 
     AFS_GLOCK();
+    lock_kernel();
 
-    sysState.allocked = 0;
+    vcp = ITOAFS(dp->d_inode);
+    parentvcp = ITOAFS(dp->d_parent->d_inode);
 
     /* If it's a negative dentry, then there's nothing to do. */
     if (!vcp || !parentvcp)
@@ -802,14 +805,15 @@
     if (sysState.allocked)
         osi_FreeLargeSpace(name);
 
-    AFS_GUNLOCK();
-    crfree(credp);
-
     if (bad_dentry) {
         shrink_dcache_parent(dp);
         d_drop(dp);
     }
 
+    unlock_kernel();
+    AFS_GUNLOCK();
+    crfree(credp);
+
     return !bad_dentry;
 }