summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs/ffs_vfsops.c
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2007-04-11 15:17:47 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2007-04-11 15:17:47 +0000
commit39929f6d9647b209b77dec51adf21cddcbd03fe0 (patch)
tree2d55a174f069dec2742830010e8f5ff87371c067 /sys/ufs/ffs/ffs_vfsops.c
parent899709ce74e74572003dde544478bff58f51f223 (diff)
in ffs_reload() use ffs_validate() to check if the
superblock is OK; Makes it work for FFS2. ok tedu@
Diffstat (limited to 'sys/ufs/ffs/ffs_vfsops.c')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 0490c992cfa..f1bee59ccf9 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.102 2007/03/31 15:30:07 pedro Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.103 2007/04/11 15:17:46 thib Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -560,11 +560,9 @@ ffs_reload(struct mount *mountp, struct ucred *cred, struct proc *p)
}
newfs = (struct fs *)bp->b_data;
- if (newfs->fs_magic != FS_MAGIC || (u_int)newfs->fs_bsize > MAXBSIZE ||
- newfs->fs_bsize < sizeof(struct fs) ||
- (u_int)newfs->fs_sbsize > SBSIZE) {
+ if (ffs_validate(newfs) == 0) {
brelse(bp);
- return (EIO); /* XXX needs translation */
+ return (EINVAL);
}
fs = VFSTOUFS(mountp)->um_fs;
/*