Source-Changes-HG archive

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

[src/pgoyette-localcount]: src/sys/dev Repair the inevitable tyops in previous.



details:   https://anonhg.NetBSD.org/src/rev/bab66438a9c4
branches:  pgoyette-localcount
changeset: 852872:bab66438a9c4
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Wed Jul 27 03:25:00 2016 +0000

description:
Repair the inevitable tyops in previous.

diffstat:

 sys/dev/fss.c |   8 ++++----
 sys/dev/md.c  |  14 +++++++-------
 2 files changed, 11 insertions(+), 11 deletions(-)

diffs (87 lines):

diff -r 7563b8ca64ef -r bab66438a9c4 sys/dev/fss.c
--- a/sys/dev/fss.c     Wed Jul 27 01:13:50 2016 +0000
+++ b/sys/dev/fss.c     Wed Jul 27 03:25:00 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fss.c,v 1.93.2.4 2016/07/27 01:13:50 pgoyette Exp $    */
+/*     $NetBSD: fss.c,v 1.93.2.5 2016/07/27 03:25:00 pgoyette Exp $    */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.4 2016/07/27 01:13:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.5 2016/07/27 03:25:00 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -225,7 +225,7 @@
                cf->cf_atname = fss_cd.cd_name;
                cf->cf_unit = minor(dev);
                cf->cf_fstate = FSTATE_STAR;
-               self = config_attach_pseudo(cf));
+               self = config_attach_pseudo(cf);
                device_acquire(self);
                sc = device_private(self);
                if (sc == NULL) {
@@ -242,7 +242,7 @@
        mutex_exit(&sc->sc_slock);
        mutex_exit(&fss_device_lock);
 
-       device_release(sc);
+       device_release(self);
        return 0;
 }
 
diff -r 7563b8ca64ef -r bab66438a9c4 sys/dev/md.c
--- a/sys/dev/md.c      Wed Jul 27 01:13:50 2016 +0000
+++ b/sys/dev/md.c      Wed Jul 27 03:25:00 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.76.2.4 2016/07/27 01:13:50 pgoyette Exp $     */
+/*     $NetBSD: md.c,v 1.76.2.5 2016/07/27 03:25:00 pgoyette Exp $     */
 
 /*
  * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76.2.4 2016/07/27 01:13:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76.2.5 2016/07/27 03:25:00 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_md.h"
@@ -291,7 +291,7 @@
                cf->cf_atname = md_cd.cd_name;
                cf->cf_unit = unit;
                cf->cf_fstate = FSTATE_STAR;
-               self = config_attach_pseudo(cf));
+               self = config_attach_pseudo(cf);
                if (self != NULL) {
                        device_acquire(self);
                        sc = device_private(self);
@@ -465,7 +465,7 @@
        }
 
        sc = device_private(self);
-       if (sc == NULL || sc->sc_type == MD_UNCONFIGURED) {
+       if (sc->sc_type == MD_UNCONFIGURED) {
                bp->b_error = ENXIO;
                goto done;
        }
@@ -515,11 +515,11 @@
                break;
        }
 
+       mutex_exit(&sc->sc_lock);
  done:
-       mutex_exit(&sc->sc_lock);
-
        biodone(bp);
-       device_release(self);
+       if (self != NULL)
+               device_release(self);
 }
 
 static int



Home | Main Index | Thread Index | Old Index