summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2022-04-27 16:53:32 +0000
committermartin <martin@NetBSD.org>2022-04-27 16:53:32 +0000
commit29ae05a7e643d7d2c6872efb2d48ec51211272a5 (patch)
treeb15824f709507b41c59cea6f9e1d895c866c45ee /lib
parenta667df8c48a0d2d13e65953cef5aab6b38ccdc57 (diff)
Pull up following revision(s) (requested by hannken in ticket #1440):
usr.sbin/quotaon/quotaon.c: revision 1.31 lib/libquota/quota_oldfiles.c: revision 1.10 sys/ufs/ufs/ufs_quota1.c: revision 1.25 Fix default quota file names, both user and group quota used the same default name "QUOTAFILENAME, names[USRQUOTA])" resulting in diagnostic assertion and possibly corrupted quota data. Keep flag "UFS_QUOTA" set until the last quota is closed. Prevents a live lock when dqrele() finds a struct with "dq_cnt == 1" and flag "DQ_MOD" and cannot sync as flag UFS_QUOTA is unset. As the quota type comes from the kernel and is only valid when quota is on get the type before quota_off and after quota_on.
Diffstat (limited to 'lib')
-rw-r--r--lib/libquota/quota_oldfiles.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libquota/quota_oldfiles.c b/lib/libquota/quota_oldfiles.c
index e2a17129555..6791482cf6b 100644
--- a/lib/libquota/quota_oldfiles.c
+++ b/lib/libquota/quota_oldfiles.c
@@ -1,4 +1,4 @@
-/* $NetBSD: quota_oldfiles.c,v 1.9 2012/02/24 18:00:09 njoly Exp $ */
+/* $NetBSD: quota_oldfiles.c,v 1.9.36.1 2022/04/27 16:53:32 martin Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: quota_oldfiles.c,v 1.9 2012/02/24 18:00:09 njoly Exp $");
+__RCSID("$NetBSD: quota_oldfiles.c,v 1.9.36.1 2022/04/27 16:53:32 martin Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@@ -255,7 +255,7 @@ __quota_oldfiles_defquotafile(struct quotahandle *qh, int idtype,
(void)snprintf(buf, maxlen, "%s/%s.%s",
qh->qh_mountpoint,
- QUOTAFILENAME, names[USRQUOTA]);
+ QUOTAFILENAME, names[idtype]);
}
const char *