git: 709989bab5d0 - main - nullfs: stop lying about mount flags in statfs(2)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Dec 2024 16:11:31 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=709989bab5d060763bb8fd8e75d33f8bd1d454ad commit 709989bab5d060763bb8fd8e75d33f8bd1d454ad Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-12-19 22:14:20 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-12-20 15:58:29 +0000 nullfs: stop lying about mount flags in statfs(2) Flags should not propagate from the lower fs. Behavior for the upper fs is determined by flags from its mount point structure. When lower fs acts according to its mount configuration, it is reported up as VOP errors. PR: 283425 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D48150 --- sys/fs/nullfs/null_vfsops.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 7ab1fb6c1a25..4cddf24a5745 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -365,12 +365,7 @@ nullfs_statfs(struct mount *mp, struct statfs *sbp) return (error); } - /* now copy across the "interesting" information and fake the rest */ sbp->f_type = mstat->f_type; - sbp->f_flags &= MNT_RDONLY | MNT_NOEXEC | MNT_NOSUID | MNT_UNION | - MNT_NOSYMFOLLOW | MNT_AUTOMOUNTED | MNT_EXPORTED | MNT_IGNORE; - mstat->f_flags &= ~(MNT_ROOTFS | MNT_AUTOMOUNTED | MNT_EXPORTED); - sbp->f_flags |= mstat->f_flags; sbp->f_bsize = mstat->f_bsize; sbp->f_iosize = mstat->f_iosize; sbp->f_blocks = mstat->f_blocks;