summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2011-07-02 16:23:48 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2011-07-02 16:23:48 +0000
commita77fd49d931b8f2724b608249ce1b6261506a53c (patch)
treeef281c381e922c32e03b4afa7b9a8b2cffe8b1a4 /sys
parent69e67ecd4305f0a615def2aba28e863c419736d0 (diff)
Getting a disklabel to extract d_secsize to initialize a variable that is then
re-initialized before use is silly. ffs shouldn't know of or worry about the physical disk sector size. ok thib@
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 1bf51469039..7e9adadbcd0 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.129 2011/07/02 15:52:25 thib Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.130 2011/07/02 16:23:47 krw Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -534,7 +534,6 @@ ffs_reload(struct mount *mountp, struct ucred *cred, struct proc *p)
struct vnode *devvp;
caddr_t space;
struct fs *fs, *newfs;
- struct partinfo dpart;
int i, blks, size, error;
int32_t *lp;
struct buf *bp = NULL;
@@ -555,11 +554,6 @@ ffs_reload(struct mount *mountp, struct ucred *cred, struct proc *p)
/*
* Step 2: re-read superblock from disk.
*/
- if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, p) != 0)
- size = DEV_BSIZE;
- else
- size = dpart.disklab->d_secsize;
-
fs = VFSTOUFS(mountp)->um_fs;
error = bread(devvp, (daddr64_t)(fs->fs_sblockloc / DEV_BSIZE), SBSIZE,
@@ -675,7 +669,6 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p)
struct buf *bp;
struct fs *fs;
dev_t dev;
- struct partinfo dpart;
caddr_t space;
daddr64_t sbloc;
int error, i, blks, size, ronly;
@@ -706,10 +699,6 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p)
error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p);
if (error)
return (error);
- if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, cred, p) != 0)
- size = DEV_BSIZE;
- else
- size = dpart.disklab->d_secsize;
bp = NULL;
ump = NULL;