git: b2b7ad916cb7 - stable/12 - Ensure that the mount command shows "with quotas" when quotas are enabled.

Kirk McKusick mckusick at FreeBSD.org
Sun Apr 18 17:08:55 UTC 2021


The branch stable/12 has been updated by mckusick:

URL: https://cgit.FreeBSD.org/src/commit/?id=b2b7ad916cb78dd01dd9ebf8ce569182159bf5f7

commit b2b7ad916cb78dd01dd9ebf8ce569182159bf5f7
Author:     Kirk McKusick <mckusick at FreeBSD.org>
AuthorDate: 2021-04-14 22:22:12 +0000
Commit:     Kirk McKusick <mckusick at FreeBSD.org>
CommitDate: 2021-04-18 17:12:24 +0000

    Ensure that the mount command shows "with quotas" when quotas are enabled.
    
    (cherry picked from commit 14d0cd7225e250015eb6d9c79a7eb4e944211b23)
---
 sys/ufs/ufs/ufs_quota.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index 0e24d45eb9f6..60a8a19ae79a 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -562,6 +562,7 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname)
 	VOP_UNLOCK(vp, 0);
 	MNT_ILOCK(mp);
 	mp->mnt_flag |= MNT_QUOTA;
+	mp->mnt_stat.f_flags |= MNT_QUOTA;
 	MNT_IUNLOCK(mp);
 
 	vpp = &ump->um_quotas[type];
@@ -764,6 +765,7 @@ quotaoff_inchange(struct thread *td, struct mount *mp, int type)
 	if (i == MAXQUOTAS) {
 		MNT_ILOCK(mp);
 		mp->mnt_flag &= ~MNT_QUOTA;
+		mp->mnt_stat.f_flags &= ~MNT_QUOTA;
 		MNT_IUNLOCK(mp);
 	}
 	UFS_UNLOCK(ump);


More information about the dev-commits-src-branches mailing list