* [REVIEW] Invalidate dentry on unlink/rmdir if using CI mode
@ 2008-06-13 6:06 Barry Naujok
2008-06-13 10:25 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Barry Naujok @ 2008-06-13 6:06 UTC (permalink / raw)
To: xfs@oss.sgi.com
Once of the interesting features of vfs_unlink/d_delete functionality
is that if it's the only inode being referenced, it makes the dentry
negative. CI doesn't work with negative dentries, so the following code
invalidate the dentry in CI mode.
--
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -482,6 +482,8 @@ xfs_vn_unlink(
if (likely(!error)) {
xfs_validate_fields(dir); /* size needs update */
xfs_validate_fields(inode);
+ if (xfs_sb_version_hasasciici(&XFS_M(dir->i_sb)->m_sb))
+ d_invalidate(dentry);
}
return -error;
}
@@ -538,6 +540,8 @@ xfs_vn_rmdir(
if (likely(!error)) {
xfs_validate_fields(inode);
xfs_validate_fields(dir);
+ if (xfs_sb_version_hasasciici(&XFS_M(dir->i_sb)->m_sb))
+ d_invalidate(dentry);
}
return -error;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-13 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-13 6:06 [REVIEW] Invalidate dentry on unlink/rmdir if using CI mode Barry Naujok
2008-06-13 10:25 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox