From bda47a9059e579e34ad3ef16e44398b4f68b77dc Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Thu, 14 Oct 2010 09:29:59 +0000 Subject: MFC r213508: Explicitely call cache_purge(fvp) when msdosfs_rename() succeeded, to flush aliases created due to msdosfs being case-insensitive. MFC r213543: Add a comment describing the reason for calling cache_purge(fvp). --- sys/fs/msdosfs/msdosfs_vnops.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sys') diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index e9c593bdc0ce..81a76e45fc73 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1270,6 +1270,14 @@ abortit: } } + /* + * The msdosfs lookup is case insensitive. Several aliases may + * be inserted for a single directory entry. As a consequnce, + * name cache purge done by lookup for fvp when DELETE op for + * namei is specified, might be not enough to expunge all + * namecache entries that were installed for this direntry. + */ + cache_purge(fvp); VOP_UNLOCK(fvp, 0); bad: if (xp) -- cgit v1.3