linux-hold-glock-across-dentry-trace-entries-while-tracing-20020725

this is actually rather scary
This commit is contained in:
Chas Williams 2002-07-26 00:11:30 +00:00 committed by Derrick Brashear
parent 0e53c862c3
commit 0f4021128e

View File

@ -931,19 +931,27 @@ 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);
if (ICL_SETACTIVE(afs_iclSetp)) {
AFS_GLOCK();
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);
AFS_GUNLOCK();
}
osi_iput(ip);
}
static int afs_dentry_delete(struct dentry *dp)
{
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 (ICL_SETACTIVE(afs_iclSetp)) {
AFS_GLOCK();
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);
AFS_GUNLOCK();
}
if (dp->d_inode && (ITOAFS(dp->d_inode)->states & CUnlinked))
return 1; /* bad inode? */