Source-Changes-HG archive

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

[src/pgoyette-localcount]: src/sys/kern Only retrieve the bdev/cdev from the ...



details:   https://anonhg.NetBSD.org/src/rev/18b03e798b75
branches:  pgoyette-localcount
changeset: 852845:18b03e798b75
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Fri Jul 22 23:02:55 2016 +0000

description:
Only retrieve the bdev/cdev from the xdevsw[] array once.

diffstat:

 sys/kern/subr_devsw.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r f285d5debe96 -r 18b03e798b75 sys/kern/subr_devsw.c
--- a/sys/kern/subr_devsw.c     Fri Jul 22 12:03:15 2016 +0000
+++ b/sys/kern/subr_devsw.c     Fri Jul 22 23:02:55 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_devsw.c,v 1.34.2.10 2016/07/22 11:59:51 pgoyette Exp $    */
+/*     $NetBSD: subr_devsw.c,v 1.34.2.11 2016/07/22 23:02:55 pgoyette Exp $    */
 
 /*-
  * Copyright (c) 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.34.2.10 2016/07/22 11:59:51 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.34.2.11 2016/07/22 23:02:55 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_dtrace.h"
@@ -478,7 +478,7 @@
        membar_datadep_consumer();
 
        /* If the devsw is not statically linked, acquire a reference */
-       if (bdevsw[bmajor]->d_localcount != NULL)
+       if (bdev->d_localcount != NULL)
                localcount_acquire(bdevsw[bmajor]->d_localcount);
 
  out:  pserialize_read_exit(s);
@@ -539,7 +539,7 @@
        membar_datadep_consumer();
 
        /* If the devsw is not statically linked, acquire a reference */
-       if (cdevsw[cmajor]->d_localcount != NULL)
+       if (cdev->d_localcount != NULL)
                localcount_acquire(cdevsw[cmajor]->d_localcount);
 
  out:  pserialize_read_exit(s);



Home | Main Index | Thread Index | Old Index