From 4683b90591349c8d42d5d13505188f8d6100351a Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 11 Apr 2019 21:13:54 +0000 Subject: [PATCH] fusefs: don't disappear a vnode on entry cache expiration When the entry cache expires, it's only necessary to purge the cache. Disappearing a vnode also purges the attribute cache, which is unnecessary, and invalidates the data cache, which could be harmful. Sponsored by: The FreeBSD Foundation --- sys/fs/fuse/fuse_vnops.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 86c01e6d5f45..bac6b00c9901 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -797,12 +797,7 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) /* Cache timeout */ atomic_add_acq_long(&fuse_lookup_cache_misses, 1); - /* - * XXX is fuse_internal_vnode_disappear ok to - * call if another process is still using the - * vnode? - */ - fuse_internal_vnode_disappear(*vpp); + cache_purge(*vpp); if (dvp != *vpp) vput(*vpp); else