The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=3a3d12112483d22624971ca97c8b975329416122
commit 3a3d12112483d22624971ca97c8b975329416122 Author: Rick Macklem <[email protected]> AuthorDate: 2026-06-18 00:30:29 +0000 Commit: Rick Macklem <[email protected]> CommitDate: 2026-06-25 00:48:15 +0000 nfs_clvnops.c: Fix the case where va_flags are being cleared Commits c5d72d2 and 3b6d4c6 broke the case where the archive/hidden/system attributes are being set false (UF_ARCHIVE, UF_HIDDEN or UF_SYSTEM bits being cleared.) and the NFS server does not support those attributes. These patches only checked for support if the archive/hidden/system attributes were non-zero. This patch fixes the problem. PR: 296088 (cherry picked from commit 572680712c317b81d66475203ac1b9d6bbeca5d5) --- sys/fs/nfsclient/nfs_clvnops.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 6b0531dda504..ecaa27a0f889 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1033,12 +1033,9 @@ nfs_setattr(struct vop_setattr_args *ap) nmp = VFSTONFS(vp->v_mount); if (vap->va_flags != VNOVAL && (!NFSHASNFSV4(nmp) || (vap->va_flags & ~(UF_ARCHIVE | UF_HIDDEN | UF_SYSTEM)) != 0 || - ((vap->va_flags & UF_ARCHIVE) != 0 && - !NFSISSET_ATTRBIT(&np->n_vattr.na_suppattr, NFSATTRBIT_ARCHIVE)) || - ((vap->va_flags & UF_HIDDEN) != 0 && - !NFSISSET_ATTRBIT(&np->n_vattr.na_suppattr, NFSATTRBIT_HIDDEN)) || - ((vap->va_flags & UF_SYSTEM) != 0 && - !NFSISSET_ATTRBIT(&np->n_vattr.na_suppattr, NFSATTRBIT_SYSTEM)))) + !NFSISSET_ATTRBIT(&np->n_vattr.na_suppattr, NFSATTRBIT_ARCHIVE) || + !NFSISSET_ATTRBIT(&np->n_vattr.na_suppattr, NFSATTRBIT_HIDDEN) || + !NFSISSET_ATTRBIT(&np->n_vattr.na_suppattr, NFSATTRBIT_SYSTEM))) return (EOPNOTSUPP); /*
