summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2007-12-16 21:22:53 +0000
committerotto <otto@openbsd.org>2007-12-16 21:22:53 +0000
commit4ec93eb95a1a43498bcbbf812996fecd0a03981c (patch)
treeab30739c14366ca9923513edf62f6a4046a50ddf
parentfix remaining cases of potential concurrent mfs_buflist access; (diff)
downloadwireguard-openbsd-4ec93eb95a1a43498bcbbf812996fecd0a03981c.tar.xz
wireguard-openbsd-4ec93eb95a1a43498bcbbf812996fecd0a03981c.zip
fix ffs2 case: fs_sblockloc's unit is disk sectors, not fragments;
ok millert@
-rw-r--r--sbin/quotacheck/quotacheck.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c
index 86dbadc2c43..dfa0c0a59a9 100644
--- a/sbin/quotacheck/quotacheck.c
+++ b/sbin/quotacheck/quotacheck.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: quotacheck.c,v 1.23 2007/07/11 13:40:24 millert Exp $ */
+/* $OpenBSD: quotacheck.c,v 1.24 2007/12/16 21:22:53 otto Exp $ */
/* $NetBSD: quotacheck.c,v 1.12 1996/03/30 22:34:25 mark Exp $ */
/*
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)quotacheck.c 8.3 (Berkeley) 1/29/94";
#else
-static char rcsid[] = "$OpenBSD: quotacheck.c,v 1.23 2007/07/11 13:40:24 millert Exp $";
+static char rcsid[] = "$OpenBSD: quotacheck.c,v 1.24 2007/12/16 21:22:53 otto Exp $";
#endif
#endif /* not lint */
@@ -291,8 +291,7 @@ chkquota(const char *vfstype, const char *fsname, const char *mntpt,
bread(sblock_try[i], (char *)&sblock, (long)SBLOCKSIZE);
if ((sblock.fs_magic == FS_UFS1_MAGIC ||
(sblock.fs_magic == FS_UFS2_MAGIC &&
- sblock.fs_sblockloc ==
- numfrags(&sblock, sblock_try[i]))) &&
+ sblock.fs_sblockloc == sblock_try[i])) &&
sblock.fs_bsize <= MAXBSIZE &&
sblock.fs_bsize >= sizeof(struct fs))
break;