afs: Fix XBSD check for VNOVAL va_uid 73/14473/2
authorAndrew Deason <adeason@sinenomine.net>
Wed, 23 Dec 2020 18:44:35 +0000 (12:44 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 30 Dec 2020 01:40:42 +0000 (20:40 -0500)
Commit e86eb73e (obsd-vattrs-20040125) introduced an XBSD-specific
check to detect some unchanged attributes. But the #ifdef for XBSD for
the va_uid section was added in the middle of an HPUX-specific block
by mistake.

Move this #ifdef one level higher, so it's actually used on BSD
platforms.

Change-Id: I606f87f21d6c4830ed8bcf50abd6fb5807868ff5
Reviewed-on: https://gerrit.openafs.org/14473
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Tim Creech <tcreech@tcreech.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/afs/VNOPS/afs_vnop_attrs.c

index beb8297..0c2620e 100644 (file)
@@ -410,11 +410,11 @@ afs_VAttrToAS(struct vcache *avc, struct vattr *av,
 #elif defined(AFS_HPUX_ENV)
 #if    defined(AFS_HPUX102_ENV)
     if (av->va_uid != UID_NO_CHANGE) {
-#elif  defined(AFS_XBSD_ENV)
-    if (av->va_uid != (uid_t)VNOVAL) {
 #else
     if (av->va_uid != ((unsigned short)-1)) {
 #endif
+#elif  defined(AFS_XBSD_ENV)
+    if (av->va_uid != (uid_t)VNOVAL) {
 #else
     if (av->va_uid != -1) {
 #endif /* AFS_LINUX22_ENV */