mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 08:50:17 +00:00
linux-dentry-deletion-for-unlinked-files-22-version-20020721
make it work for 2.2 kernels also also some debugging
This commit is contained in:
parent
349c211789
commit
73cdd10a1b
@ -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 *) */
|
||||
};
|
||||
|
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user