|
@@ -475,6 +475,13 @@ xfs_vn_unlink(
|
|
if (likely(!error)) {
|
|
if (likely(!error)) {
|
|
xfs_validate_fields(dir); /* size needs update */
|
|
xfs_validate_fields(dir); /* size needs update */
|
|
xfs_validate_fields(inode);
|
|
xfs_validate_fields(inode);
|
|
|
|
+ /*
|
|
|
|
+ * With unlink, the VFS makes the dentry "negative": no inode,
|
|
|
|
+ * but still hashed. This is incompatible with case-insensitive
|
|
|
|
+ * mode, so invalidate (unhash) the dentry in CI-mode.
|
|
|
|
+ */
|
|
|
|
+ if (xfs_sb_version_hasasciici(&XFS_M(dir->i_sb)->m_sb))
|
|
|
|
+ d_invalidate(dentry);
|
|
}
|
|
}
|
|
return -error;
|
|
return -error;
|
|
}
|
|
}
|
|
@@ -531,6 +538,13 @@ xfs_vn_rmdir(
|
|
if (likely(!error)) {
|
|
if (likely(!error)) {
|
|
xfs_validate_fields(inode);
|
|
xfs_validate_fields(inode);
|
|
xfs_validate_fields(dir);
|
|
xfs_validate_fields(dir);
|
|
|
|
+ /*
|
|
|
|
+ * With rmdir, the VFS makes the dentry "negative": no inode,
|
|
|
|
+ * but still hashed. This is incompatible with case-insensitive
|
|
|
|
+ * mode, so invalidate (unhash) the dentry in CI-mode.
|
|
|
|
+ */
|
|
|
|
+ if (xfs_sb_version_hasasciici(&XFS_M(dir->i_sb)->m_sb))
|
|
|
|
+ d_invalidate(dentry);
|
|
}
|
|
}
|
|
return -error;
|
|
return -error;
|
|
}
|
|
}
|