Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dm dm: Make global dm locks static
details: https://anonhg.NetBSD.org/src/rev/2a76e79237c2
branches: trunk
changeset: 465775:2a76e79237c2
user: tkusumi <tkusumi%NetBSD.org@localhost>
date: Tue Dec 03 16:22:01 2019 +0000
description:
dm: Make global dm locks static
These are all per-file locks which protect dev/pdev/target structure.
taken-from: DragonFlyBSD
diffstat:
sys/dev/dm/dm_dev.c | 6 +++---
sys/dev/dm/dm_pdev.c | 6 +++---
sys/dev/dm/dm_target.c | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 333ddb7d1a25 -r 2a76e79237c2 sys/dev/dm/dm_dev.c
--- a/sys/dev/dm/dm_dev.c Tue Dec 03 16:21:34 2019 +0000
+++ b/sys/dev/dm/dm_dev.c Tue Dec 03 16:22:01 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_dev.c,v 1.11 2018/01/05 14:22:26 christos Exp $ */
+/* $NetBSD: dm_dev.c,v 1.12 2019/12/03 16:22:01 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_dev.c,v 1.11 2018/01/05 14:22:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_dev.c,v 1.12 2019/12/03 16:22:01 tkusumi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -50,7 +50,7 @@
static struct dm_dev_head dm_dev_list =
TAILQ_HEAD_INITIALIZER(dm_dev_list);
-kmutex_t dm_dev_mutex;
+static kmutex_t dm_dev_mutex;
/* dm_dev_mutex must be holdby caller before using disable_dev. */
__inline static void
diff -r 333ddb7d1a25 -r 2a76e79237c2 sys/dev/dm/dm_pdev.c
--- a/sys/dev/dm/dm_pdev.c Tue Dec 03 16:21:34 2019 +0000
+++ b/sys/dev/dm/dm_pdev.c Tue Dec 03 16:22:01 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_pdev.c,v 1.12 2019/12/03 15:47:38 tkusumi Exp $ */
+/* $NetBSD: dm_pdev.c,v 1.13 2019/12/03 16:22:01 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v 1.12 2019/12/03 15:47:38 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v 1.13 2019/12/03 16:22:01 tkusumi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -45,7 +45,7 @@
SLIST_HEAD(dm_pdevs, dm_pdev) dm_pdev_list;
-kmutex_t dm_pdev_mutex;
+static kmutex_t dm_pdev_mutex;
static dm_pdev_t *dm_pdev_alloc(const char *);
static int dm_pdev_rem(dm_pdev_t *);
diff -r 333ddb7d1a25 -r 2a76e79237c2 sys/dev/dm/dm_target.c
--- a/sys/dev/dm/dm_target.c Tue Dec 03 16:21:34 2019 +0000
+++ b/sys/dev/dm/dm_target.c Tue Dec 03 16:22:01 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_target.c,v 1.20 2018/01/05 14:22:26 christos Exp $ */
+/* $NetBSD: dm_target.c,v 1.21 2019/12/03 16:22:01 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.20 2018/01/05 14:22:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.21 2019/12/03 16:22:01 tkusumi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -48,7 +48,7 @@
static struct dm_target_head dm_target_list =
TAILQ_HEAD_INITIALIZER(dm_target_list);
-kmutex_t dm_target_mutex;
+static kmutex_t dm_target_mutex;
/*
* Called indirectly from dm_table_load_ioctl to mark target as used.
Home |
Main Index |
Thread Index |
Old Index