git: 0586a1290446 - main - nfscl: Clean up the code by removing vfs_flags() macro
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 20 Jun 2022 20:24:07 UTC
The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=0586a12904461c3d99eb76e1d66706782c0d14be commit 0586a12904461c3d99eb76e1d66706782c0d14be Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2022-06-20 20:23:04 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2022-06-20 20:23:04 +0000 nfscl: Clean up the code by removing vfs_flags() macro The vfs_flags() macro was used to make the code compatible with Mac OSX, for the Mac OSX port. For FreeBSD, this macro just obscured the code, so remove it to clean up the code. This commit should not result in a semantics change. --- sys/fs/nfs/nfskpiport.h | 1 - sys/fs/nfsserver/nfs_nfsdserv.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/fs/nfs/nfskpiport.h b/sys/fs/nfs/nfskpiport.h index c605bc9d8253..311465aba607 100644 --- a/sys/fs/nfs/nfskpiport.h +++ b/sys/fs/nfs/nfskpiport.h @@ -36,7 +36,6 @@ * Darwin8 and hopefully subsequent releases from Apple.) */ typedef struct mount * mount_t; -#define vfs_flags(m) ((m)->mnt_flag) typedef struct vnode * vnode_t; #define vnode_vtype(v) ((v)->v_type) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 3f896effd8ce..4cc14340d7d1 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -438,7 +438,7 @@ nfsrvd_setattr(struct nfsrv_descript *nd, __unused int isdgram, if (!nd->nd_repstat) { if (NFSVNO_NOTSETSIZE(&nva)) { if (NFSVNO_EXRDONLY(exp) || - (vfs_flags(vp->v_mount) & MNT_RDONLY)) + (vp->v_mount->mnt_flag & MNT_RDONLY)) nd->nd_repstat = EROFS; } else { if (vnode_vtype(vp) != VREG)