Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/sysvbfs remove unused call to DIOCGPART that was only...



details:   https://anonhg.NetBSD.org/src/rev/66f569878777
branches:  trunk
changeset: 771199:66f569878777
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Nov 13 23:07:11 2011 +0000

description:
remove unused call to DIOCGPART that was only used for debugging.
malloc M_WAITOK, does not fail.

diffstat:

 sys/fs/sysvbfs/sysvbfs_vfsops.c |  21 +++------------------
 1 files changed, 3 insertions(+), 18 deletions(-)

diffs (63 lines):

diff -r 4ec8af5f472f -r 66f569878777 sys/fs/sysvbfs/sysvbfs_vfsops.c
--- a/sys/fs/sysvbfs/sysvbfs_vfsops.c   Sun Nov 13 23:03:55 2011 +0000
+++ b/sys/fs/sysvbfs/sysvbfs_vfsops.c   Sun Nov 13 23:07:11 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysvbfs_vfsops.c,v 1.37 2011/07/13 19:51:29 njoly Exp $        */
+/*     $NetBSD: sysvbfs_vfsops.c,v 1.38 2011/11/13 23:07:11 christos Exp $     */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.37 2011/07/13 19:51:29 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.38 2011/11/13 23:07:11 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -39,7 +39,6 @@
 #include <sys/time.h>
 #include <sys/ucred.h>
 #include <sys/mount.h>
-#include <sys/disklabel.h>
 #include <sys/fcntl.h>
 #include <sys/malloc.h>
 #include <sys/kauth.h>
@@ -163,7 +162,6 @@
 {
        kauth_cred_t cred = l->l_cred;
        struct sysvbfs_mount *bmp;
-       struct partinfo dpart;
        int error, oflags;
        bool devopen = false;
 
@@ -180,16 +178,7 @@
                goto out;
        devopen = true;
 
-       /* Get partition information */
-       if ((error = VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred)) != 0) {
-               goto out;
-       }
-
-       bmp = malloc(sizeof(struct sysvbfs_mount), M_SYSVBFS_VFS, M_WAITOK);
-       if (bmp == NULL) {
-               error = ENOMEM;
-               goto out;
-       }
+       bmp = malloc(sizeof(*bmp), M_SYSVBFS_VFS, M_WAITOK | M_ZERO);
        bmp->devvp = devvp;
        bmp->mountp = mp;
        if ((error = sysvbfs_bfs_init(&bmp->bfs, devvp)) != 0) {
@@ -207,10 +196,6 @@
        mp->mnt_dev_bshift = BFS_BSHIFT;
        mp->mnt_fs_bshift = BFS_BSHIFT;
 
-       DPRINTF("%s: fstype=%d dtype=%d bsize=%d\n", __func__,
-           dpart.part->p_fstype, dpart.disklab->d_type,
-           dpart.disklab->d_secsize);
-
  out:
        if (devopen && error)
                VOP_CLOSE(devvp, oflags, NOCRED);



Home | Main Index | Thread Index | Old Index