fix-fstrace-for-linux-20040714
authorChas Williams <chas@cmf.nrl.navy.mil>
Wed, 14 Jul 2004 05:21:54 +0000 (05:21 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 14 Jul 2004 05:21:54 +0000 (05:21 +0000)
FIXES 5835

don't deadlock when flushing dcache children

src/afs/afs_vcache.c

index 188ba6a..0c86e81 100644 (file)
@@ -656,10 +656,14 @@ afs_TryFlushDcacheChildren(struct vcache *tvc)
     while ((cur = cur->next) != head) {
        dentry = list_entry(cur, struct dentry, d_alias);
 
-       afs_Trace3(afs_iclSetp, CM_TRACE_TRYFLUSHDCACHECHILDREN,
+       if (ICL_SETACTIVE(afs_iclSetp)) {
+           AFS_GLOCK();
+           afs_Trace3(afs_iclSetp, CM_TRACE_TRYFLUSHDCACHECHILDREN,
                   ICL_TYPE_POINTER, ip, ICL_TYPE_STRING,
                   dentry->d_parent->d_name.name, ICL_TYPE_STRING,
                   dentry->d_name.name);
+           AFS_GUNLOCK();
+       }
 
        if (!list_empty(&dentry->d_hash) && !list_empty(&dentry->d_subdirs))
            __shrink_dcache_parent(dentry);