From 606d794b2b21d7350e1d3329432f5452ed891789 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 25 Oct 2022 14:57:28 -0500 Subject: [PATCH] FBSD: Avoid requiring VI_FREE FreeBSD commit cc3593fbd953e2eeec72dbca05e77632817cba0b (vfs: rework vnode list management) removes VI_FREE. Our only user of VI_FREE is some extra debug logging, so just pretend the flag isn't set if VI_FREE isn't defined. Change-Id: I77cc13683602bc1c1b920331847153371fbf4969 Reviewed-on: https://gerrit.openafs.org/15167 Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Tested-by: BuildBot --- src/afs/VNOPS/afs_vnop_write.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/afs/VNOPS/afs_vnop_write.c b/src/afs/VNOPS/afs_vnop_write.c index 96403f3af0..e457458eb2 100644 --- a/src/afs/VNOPS/afs_vnop_write.c +++ b/src/afs/VNOPS/afs_vnop_write.c @@ -624,11 +624,13 @@ afs_close(OSI_VC_DECL(avc), afs_int32 aflags, afs_ucred_t *acred) #if defined(AFS_FBSD_ENV) /* XXX */ if (!avc->opens) { - afs_int32 opens, is_free, is_gone, is_doomed, iflag; + afs_int32 opens, is_free = 0, is_gone, is_doomed, iflag; struct vnode *vp = AFSTOV(avc); VI_LOCK(vp); is_doomed = AFS_IS_DOOMED(vp); +# ifdef VI_FREE is_free = vp->v_iflag & VI_FREE; +# endif is_gone = vp->v_iflag & VI_DOINGINACT; iflag = vp->v_iflag; VI_UNLOCK(vp);