aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-08-04 19:52:52 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-08-04 19:52:52 +0000
commit0311b05fecd8cbd9350ae29fc31f227a6167f042 (patch)
tree249b1ccc6895a11da30866103abc32ce6d69964f /sys
parent3211e783e3c24a7b0655101774fc939147a453b0 (diff)
downloadsrc-0311b05fecd8cbd9350ae29fc31f227a6167f042.tar.gz
src-0311b05fecd8cbd9350ae29fc31f227a6167f042.zip
cache: add missing numcache detrement on insertion failure
Notes
Notes: svn path=/head/; revision=363855
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_cache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 24638d39ee18..81ad03c9fd84 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -2001,6 +2001,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, struct componentname *cnp,
return;
out_unlock_free:
cache_enter_unlock(&cel);
+ atomic_add_long(&numcache, -1);
cache_free(ncp);
return;
}