Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Remove bogus dk_getdisklabel call.



details:   https://anonhg.NetBSD.org/src/rev/ed580f344c73
branches:  trunk
changeset: 341911:ed580f344c73
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sat Nov 28 21:06:30 2015 +0000

description:
Remove bogus dk_getdisklabel call.

- there is no need to read the label in the attach routine
- passing a (dev_t)0 may cause havoc.

This fixes PR 41704.

diffstat:

 sys/dev/cgd.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r 06ce7eb51c40 -r ed580f344c73 sys/dev/cgd.c
--- a/sys/dev/cgd.c     Sat Nov 28 20:51:36 2015 +0000
+++ b/sys/dev/cgd.c     Sat Nov 28 21:06:30 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.105 2015/11/28 14:45:24 mlelstv Exp $ */
+/* $NetBSD: cgd.c,v 1.106 2015/11/28 21:06:30 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.105 2015/11/28 14:45:24 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.106 2015/11/28 21:06:30 mlelstv Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -711,9 +711,6 @@
 
        disk_set_info(dksc->sc_dev, &dksc->sc_dkdev, NULL);
 
-       /* Try and read the disklabel. */
-       dk_getdisklabel(dksc, 0 /* XXX ? (cause of PR 41704) */);
-
        /* Discover wedges on this disk. */
        dkwedge_discover(&dksc->sc_dkdev);
 



Home | Main Index | Thread Index | Old Index