Module Name: src Committed By: christos Date: Sun Jul 5 20:37:40 UTC 2020
Modified Files: src/sys/ufs/ffs: ffs_vfsops.c Log Message: simplify the acl setup, and fix reversed mask in the fs_flags code. To generate a diff of this commit: cvs rdiff -u -r1.370 -r1.371 src/sys/ufs/ffs/ffs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/ufs/ffs/ffs_vfsops.c diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.370 src/sys/ufs/ffs/ffs_vfsops.c:1.371 --- src/sys/ufs/ffs/ffs_vfsops.c:1.370 Mon May 18 04:28:44 2020 +++ src/sys/ufs/ffs/ffs_vfsops.c Sun Jul 5 16:37:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_vfsops.c,v 1.370 2020/05/18 08:28:44 hannken Exp $ */ +/* $NetBSD: ffs_vfsops.c,v 1.371 2020/07/05 20:37:40 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.370 2020/05/18 08:28:44 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.371 2020/07/05 20:37:40 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -404,8 +404,8 @@ ffs_acls(struct mount *mp, int fs_flags) printf("WARNING: %s: ACLs flag on fs conflicts with " "\"posix1eacls\" mount option; option ignored\n", mp->mnt_stat.f_mntonname); - mp->mnt_flag &= ~MNT_ACLS; - mp->mnt_flag |= MNT_POSIX1EACLS; + mp->mnt_flag &= ~MNT_POSIX1EACLS; + mp->mnt_flag |= MNT_ACLS; #else printf("WARNING: %s: ACLs flag on fs but no ACLs support\n", @@ -418,8 +418,8 @@ ffs_acls(struct mount *mp, int fs_flags) printf("WARNING: %s: NFSv4 ACLs flag on fs conflicts " "with \"acls\" mount option; option ignored\n", mp->mnt_stat.f_mntonname); - mp->mnt_flag &= ~MNT_POSIX1EACLS; - mp->mnt_flag |= MNT_ACLS; + mp->mnt_flag &= ~MNT_ACLS; + mp->mnt_flag |= MNT_POSIX1EACLS; #else printf("WARNING: %s: POSIX.1e ACLs flag on fs but no " "ACLs support\n", mp->mnt_stat.f_mntonname); @@ -658,14 +658,13 @@ ffs_mount(struct mount *mp, const char * fs->fs_fmod = 0; } + ffs_acls(mp, fs->fs_flags); if (mp->mnt_flag & MNT_RELOAD) { error = ffs_reload(mp, l->l_cred, l); if (error) { DPRINTF("ffs_reload returned %d", error); return error; } - } else { - ffs_acls(mp, 0); } if (fs->fs_ronly && (mp->mnt_iflag & IMNT_WANTRDWR)) { @@ -908,8 +907,6 @@ ffs_reload(struct mount *mp, kauth_cred_ } ffs_oldfscompat_read(fs, ump, sblockloc); - ffs_acls(mp, 0); - mutex_enter(&ump->um_lock); ump->um_maxfilesize = fs->fs_maxfilesize; if (fs->fs_flags & ~(FS_KNOWN_FLAGS | FS_INTERNAL)) {