summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/fsck_ffs/pass1.c6
-rw-r--r--sys/ufs/ffs/fs.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c
index 4da58abf8c9..e149dcf15ab 100644
--- a/sbin/fsck_ffs/pass1.c
+++ b/sbin/fsck_ffs/pass1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pass1.c,v 1.28 2008/11/02 08:54:10 otto Exp $ */
+/* $OpenBSD: pass1.c,v 1.29 2008/11/06 18:01:44 deraadt Exp $ */
/* $NetBSD: pass1.c,v 1.16 1996/09/27 22:45:15 christos Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pass1.c 8.1 (Berkeley) 6/5/93";
#else
-static const char rcsid[] = "$OpenBSD: pass1.c,v 1.28 2008/11/02 08:54:10 otto Exp $";
+static const char rcsid[] = "$OpenBSD: pass1.c,v 1.29 2008/11/06 18:01:44 deraadt Exp $";
#endif
#endif /* not lint */
@@ -155,7 +155,7 @@ checkinode(ino_t inumber, struct inodesc *idesc)
}
lastino = inumber;
/* This should match the file size limit in ffs_mountfs(). */
- kernmaxfilesize = FS_KERNMAXFILESIZE(&sblock);
+ kernmaxfilesize = FS_KERNMAXFILESIZE(getpagesize(), &sblock);
if (DIP(dp, di_size) > kernmaxfilesize ||
DIP(dp, di_size) > sblock.fs_maxfilesize ||
(mode == IFDIR && DIP(dp, di_size) > MAXDIRSIZE)) {
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h
index 8acb0db3c5c..c68ca2f799e 100644
--- a/sys/ufs/ffs/fs.h
+++ b/sys/ufs/ffs/fs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fs.h,v 1.34 2008/11/02 08:53:06 otto Exp $ */
+/* $OpenBSD: fs.h,v 1.35 2008/11/06 18:01:45 deraadt Exp $ */
/* $NetBSD: fs.h,v 1.6 1995/04/12 21:21:02 mycroft Exp $ */
/*
@@ -580,8 +580,8 @@ struct ocg {
* to 2^31 pages to prevent overflow of a 32-bit unsigned int. The buffer
* cache has its own checks but a little added paranoia never hurts.
*/
-#define FS_KERNMAXFILESIZE(fs) ((u_int64_t)0x80000000 * \
- MIN(PAGE_SIZE, (fs)->fs_bsize) - 1)
+#define FS_KERNMAXFILESIZE(pgsiz, fs) ((u_int64_t)0x80000000 * \
+ MIN((pgsiz), (fs)->fs_bsize) - 1)
extern const int inside[], around[];
extern const u_char *fragtbl[];