From 7bf627fd71f760e5b8625b518deb7bf4f20a4457 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 2 Mar 2012 18:55:19 +0000 Subject: Similar to the fixes in 226967 and 226987, purge any name cache entries associated with the previous vnode (if any) associated with the target of a rename(). Otherwise, a lookup of the target pathname concurrent with a rename() could re-add a name cache entry after the namei(RENAME) lookup in kern_renameat() had purged the target pathname. MFC after: 2 weeks --- sys/fs/tmpfs/tmpfs_vnops.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/fs/tmpfs') diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 93fea8b..d5cae29 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1135,6 +1135,8 @@ tmpfs_rename(struct vop_rename_args *v) tmpfs_free_dirent(VFS_TO_TMPFS(tvp->v_mount), de, TRUE); } cache_purge(fvp); + if (tvp != NULL) + cache_purge(tvp); error = 0; -- cgit v1.1