diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 9bd392f401..e18d6b331c 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -931,17 +931,23 @@ static int afs_linux_dentry_revalidate(struct dentry *dp) /* afs_dentry_iput */ static void afs_dentry_iput(struct dentry *dp, struct inode *ip) { + afs_Trace3(afs_iclSetp, CM_TRACE_DENTRYIPUT, + ICL_TYPE_POINTER, ip, + ICL_TYPE_STRING, dp->d_parent->d_name.name, + ICL_TYPE_STRING, dp->d_name.name); + osi_iput(ip); } static int afs_dentry_delete(struct dentry *dp) { - if (dp->d_inode && (ITOAFS(dp->d_inode)->states & CUnlinked)) - return 1; /* bad inode? */ - afs_Trace3(afs_iclSetp, CM_TRACE_DENTRYDELETE, ICL_TYPE_POINTER, dp->d_inode, ICL_TYPE_STRING, dp->d_parent->d_name.name, ICL_TYPE_STRING, dp->d_name.name); + + if (dp->d_inode && (ITOAFS(dp->d_inode)->states & CUnlinked)) + return 1; /* bad inode? */ + return 0; } @@ -957,7 +963,7 @@ struct dentry_operations afs_dentry_operations = { afs_linux_dentry_revalidate, /* d_validate(struct dentry *) */ NULL, /* d_hash */ NULL, /* d_compare */ - NULL, /* d_delete(struct dentry *) */ + afs_dentry_delete, /* d_delete(struct dentry *) */ NULL, /* d_release(struct dentry *) */ afs_dentry_iput /* d_iput(struct dentry *, struct inode *) */ }; diff --git a/src/afs/afs_trace.et b/src/afs/afs_trace.et index 0d1decf076..910f68fa60 100644 --- a/src/afs/afs_trace.et +++ b/src/afs/afs_trace.et @@ -157,7 +157,8 @@ error_table 2 ZCM ec CM_TRACE_VNODEREAD, "UFSRead: tdc 0x%x, offset (0x%x, 0x%x) len (0x%x 0x%x)" ec CM_TRACE_SLEEP, "Sleep: evp 0x%x, count %d seq 0x%x evp->seq 0x%x" ec CM_TRACE_WAKE, "Wakeup: evp 0x%x, evp->seq 0x%x" - ec CM_TRACE_DENTRYDELETE, "dentry_delete inode 0x%x d_name %s/%s" - ec CM_TRACE_TRYFLUSHDCACHECHILDREN, "TryFlushDcacheChildren tvc 0x%x" + ec CM_TRACE_DENTRYDELETE, "d_delete inode 0x%x d_name %s/%s" + ec CM_TRACE_DENTRYIPUT, "d_iput inode 0x%x d_name %s/%s" + ec CM_TRACE_TRYFLUSHDCACHECHILDREN, "TryFlushDcacheChildren ip 0x%x" end diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 16bf085a75..10be5a024f 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -482,6 +482,9 @@ static void afs_TryFlushDcacheChildren(struct vcache *tvc) struct dentry *dentry; #if 1 + afs_Trace1(afs_iclSetp, CM_TRACE_TRYFLUSHDCACHECHILDREN, + ICL_TYPE_POINTER, ip); + VN_HOLD(tvc); AFS_GUNLOCK(); d_prune_aliases(ip);