diff options
author | jhb <jhb@FreeBSD.org> | 2012-03-02 18:55:19 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2012-03-02 18:55:19 +0000 |
commit | 7bf627fd71f760e5b8625b518deb7bf4f20a4457 (patch) | |
tree | 283357f5fff10643b6db17b4a253ea7b03aef481 /sys/fs | |
parent | 867957a35936d68f21e0b415c035d218626e5372 (diff) | |
download | FreeBSD-src-7bf627fd71f760e5b8625b518deb7bf4f20a4457.zip FreeBSD-src-7bf627fd71f760e5b8625b518deb7bf4f20a4457.tar.gz |
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
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vnops.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |