aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorBarry Naujok <bnaujok@sgi.com>2008-06-15 22:07:41 -0400
committerNiv Sardi <xaiki@debian.org>2008-07-28 02:58:47 -0400
commitd532506cd8b59543b376e155508f88a03a81dad1 (patch)
tree554e401cf6bcb9894e0110e05ead0d04d6d0e907 /fs/xfs
parent87affd08bc9c741b99053cabb908cf54a135a0fa (diff)
[XFS] Invalidate dentry in unlink/rmdir if in case-insensitive mode
The vfs_unlink/d_delete functionality in the Linux VFS make the dentry negative if it is the only inode being referenced. Case-insensitive mode doesn't work with negative dentries, so if using CI-mode, invalidate the dentry on unlink/rmdir. SGI-PV: 983102 SGI-Modid: xfs-linux-melb:xfs-kern:31308a Signed-off-by: Barry Naujok <bnaujok@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 62330f283951..190ed61bcd42 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -475,6 +475,13 @@ xfs_vn_unlink(
475 if (likely(!error)) { 475 if (likely(!error)) {
476 xfs_validate_fields(dir); /* size needs update */ 476 xfs_validate_fields(dir); /* size needs update */
477 xfs_validate_fields(inode); 477 xfs_validate_fields(inode);
478 /*
479 * With unlink, the VFS makes the dentry "negative": no inode,
480 * but still hashed. This is incompatible with case-insensitive
481 * mode, so invalidate (unhash) the dentry in CI-mode.
482 */
483 if (xfs_sb_version_hasasciici(&XFS_M(dir->i_sb)->m_sb))
484 d_invalidate(dentry);
478 } 485 }
479 return -error; 486 return -error;
480} 487}
@@ -531,6 +538,13 @@ xfs_vn_rmdir(
531 if (likely(!error)) { 538 if (likely(!error)) {
532 xfs_validate_fields(inode); 539 xfs_validate_fields(inode);
533 xfs_validate_fields(dir); 540 xfs_validate_fields(dir);
541 /*
542 * With rmdir, the VFS makes the dentry "negative": no inode,
543 * but still hashed. This is incompatible with case-insensitive
544 * mode, so invalidate (unhash) the dentry in CI-mode.
545 */
546 if (xfs_sb_version_hasasciici(&XFS_M(dir->i_sb)->m_sb))
547 d_invalidate(dentry);
534 } 548 }
535 return -error; 549 return -error;
536} 550}