aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2021-11-14 16:57:11 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2022-03-05 19:53:20 +0000
commitdf7ebff33c654a82d8efbce52d7d66e93fd773e7 (patch)
treec573269633d0becfd0006db6d87b433298a2dca5
parent54c0eac7c101c9927d581c12dcf2d6a2514d6aaf (diff)
cache: whack "set but not used" warnings
(cherry picked from commit 7e9680d3be484baac7fe78cef2be4e7ce4b4946f)
-rw-r--r--sys/kern/vfs_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index bc85c96c045f..ef4e33308472 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -4781,7 +4781,6 @@ cache_fplookup_emptypath(struct cache_fpl *fpl)
struct componentname *cnp;
enum vgetstate tvs;
struct vnode *tvp;
- seqc_t tvp_seqc;
int error, lkflags;
fpl->tvp = fpl->dvp;
@@ -4790,7 +4789,6 @@ cache_fplookup_emptypath(struct cache_fpl *fpl)
ndp = fpl->ndp;
cnp = fpl->cnp;
tvp = fpl->tvp;
- tvp_seqc = fpl->tvp_seqc;
MPASS(*cnp->cn_pnbuf == '\0');
@@ -5085,11 +5083,13 @@ cache_fplookup_dotdot(struct cache_fpl *fpl)
static int __noinline
cache_fplookup_neg(struct cache_fpl *fpl, struct namecache *ncp, uint32_t hash)
{
- u_char nc_flag;
+ u_char nc_flag __diagused;
bool neg_promote;
+#ifdef INVARIANTS
nc_flag = atomic_load_char(&ncp->nc_flag);
MPASS((nc_flag & NCF_NEGATIVE) != 0);
+#endif
/*
* If they want to create an entry we need to replace this one.
*/