[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/kernel/linux-2.6:
dcache.c
CVS commit program
cvs at parl.clemson.edu
Fri Feb 1 12:17:12 EST 2008
Update of /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6
In directory parlweb1:/tmp/cvs-serv8383/src/kernel/linux-2.6
Modified Files:
Tag: pvfs-2-7-branch
dcache.c
Log Message:
merging d_delete stuff from trunk to pvfs-2-7-branch. This should fix nfs
re-exporting for the 2-7 series.
Index: dcache.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/dcache.c,v
diff -p -u -r1.32.2.2 -r1.32.2.3
--- dcache.c 23 Jan 2008 19:58:12 -0000 1.32.2.2
+++ dcache.c 1 Feb 2008 17:17:12 -0000 1.32.2.3
@@ -78,6 +78,10 @@ static int pvfs2_d_revalidate_common(str
{
gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_revalidate_common: lookup failure or no match.\n");
op_release(new_op);
+ /* mark the inode as bad so that d_delete will be aggressive
+ * about dropping the dentry
+ */
+ pvfs2_make_bad_inode(inode);
return(0);
}
@@ -104,7 +108,16 @@ static int pvfs2_d_revalidate_common(str
static int pvfs2_d_delete (struct dentry * dentry)
{
gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_delete: called on dentry %p.\n", dentry);
- return 1;
+ if(dentry->d_inode && is_bad_inode(dentry->d_inode))
+ {
+ gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_delete: returning 1 (bad inode).\n");
+ return 1;
+ }
+ else
+ {
+ gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_delete: returning 0 (inode looks ok).\n");
+ return 0;
+ }
}
/* should return 1 if dentry can still be trusted, else 0 */
More information about the Pvfs2-cvs
mailing list