aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_cache.c
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-09-23 10:42:41 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-09-23 10:42:41 +0000
commitefeec5f0c62235b4c4a740dffde5f08103638571 (patch)
tree809859fa17e43c9ac00b50d634d14bca65263966 /sys/kern/vfs_cache.c
parent867ae3c38d1aa97300bd35f457037b3f1a0a103f (diff)
downloadsrc-efeec5f0c62235b4c4a740dffde5f08103638571.tar.gz
src-efeec5f0c62235b4c4a740dffde5f08103638571.zip
Notes
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r--sys/kern/vfs_cache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index ca3171c247dc..b30bc57c575c 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -841,7 +841,7 @@ cache_negative_insert(struct namecache *ncp)
mtx_lock(&neglist->nl_lock);
TAILQ_INSERT_TAIL(&neglist->nl_list, ncp, nc_dst);
mtx_unlock(&neglist->nl_lock);
- atomic_add_rel_long(&numneg, 1);
+ atomic_add_long(&numneg, 1);
}
static void
@@ -887,7 +887,7 @@ cache_negative_remove(struct namecache *ncp)
mtx_unlock(&neglist->nl_lock);
if (hot_locked)
mtx_unlock(&ncneg_hot.nl_lock);
- atomic_subtract_rel_long(&numneg, 1);
+ atomic_subtract_long(&numneg, 1);
}
static void
@@ -1030,7 +1030,7 @@ cache_zap_locked(struct namecache *ncp)
counter_u64_add(numcachehv, -1);
}
}
- atomic_subtract_rel_long(&numcache, 1);
+ atomic_subtract_long(&numcache, 1);
}
static void
@@ -1959,7 +1959,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, struct componentname *cnp,
*/
lnumcache = atomic_fetchadd_long(&numcache, 1) + 1;
if (__predict_false(lnumcache >= ncsize)) {
- atomic_add_long(&numcache, -1);
+ atomic_subtract_long(&numcache, 1);
counter_u64_add(numdrops, 1);
return;
}
@@ -2125,7 +2125,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);
+ atomic_subtract_long(&numcache, 1);
cache_free(ncp);
return;
}