Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Don't take the mutex in extent_print if EX_EARLY



details:   https://anonhg.NetBSD.org/src/rev/2fa664888735
branches:  trunk
changeset: 828769:2fa664888735
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Dec 31 09:25:19 2017 +0000

description:
Don't take the mutex in extent_print if EX_EARLY

diffstat:

 sys/kern/subr_extent.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 0547211a01ad -r 2fa664888735 sys/kern/subr_extent.c
--- a/sys/kern/subr_extent.c    Sun Dec 31 08:29:38 2017 +0000
+++ b/sys/kern/subr_extent.c    Sun Dec 31 09:25:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_extent.c,v 1.86 2017/11/09 21:57:06 christos Exp $        */
+/*     $NetBSD: subr_extent.c,v 1.87 2017/12/31 09:25:19 skrll Exp $   */
 
 /*-
  * Copyright (c) 1996, 1998, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_extent.c,v 1.86 2017/11/09 21:57:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_extent.c,v 1.87 2017/12/31 09:25:19 skrll Exp $");
 
 #ifdef _KERNEL
 #ifdef _KERNEL_OPT
@@ -1168,7 +1168,8 @@
        if (ex == NULL)
                panic("extent_print: NULL extent");
 
-       mutex_enter(&ex->ex_lock);
+       if (!(ex->ex_flags & EXF_EARLY))
+               mutex_enter(&ex->ex_lock);
 
        printf("extent `%s' (0x%lx - 0x%lx), flags = 0x%x\n", ex->ex_name,
            ex->ex_start, ex->ex_end, ex->ex_flags);
@@ -1176,5 +1177,6 @@
        LIST_FOREACH(rp, &ex->ex_regions, er_link)
                printf("     0x%lx - 0x%lx\n", rp->er_start, rp->er_end);
 
-       mutex_exit(&ex->ex_lock);
+       if (!(ex->ex_flags & EXF_EARLY))
+               mutex_exit(&ex->ex_lock);
 }



Home | Main Index | Thread Index | Old Index