Source-Changes-HG archive

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

[src/trunk]: src/sys/miscfs/specfs specfs: Note lock order for vnode lock, de...



details:   https://anonhg.NetBSD.org/src/rev/104ff5162444
branches:  trunk
changeset: 364496:104ff5162444
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Mar 28 12:34:25 2022 +0000

description:
specfs: Note lock order for vnode lock, device_lock, v_interlock.

diffstat:

 sys/miscfs/specfs/spec_vnops.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 5dd608e8d671 -r 104ff5162444 sys/miscfs/specfs/spec_vnops.c
--- a/sys/miscfs/specfs/spec_vnops.c    Mon Mar 28 12:34:17 2022 +0000
+++ b/sys/miscfs/specfs/spec_vnops.c    Mon Mar 28 12:34:25 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spec_vnops.c,v 1.185 2022/03/28 12:34:17 riastradh Exp $       */
+/*     $NetBSD: spec_vnops.c,v 1.186 2022/03/28 12:34:25 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.185 2022/03/28 12:34:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.186 2022/03/28 12:34:25 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -85,6 +85,14 @@
 #include <miscfs/genfs/genfs.h>
 #include <miscfs/specfs/specdev.h>
 
+/*
+ * Lock order:
+ *
+ *     vnode lock
+ *     -> device_lock
+ *     -> struct vnode::v_interlock
+ */
+
 /* symbolic sleep message strings for devices */
 const char     devopn[] = "devopn";
 const char     devio[] = "devio";



Home | Main Index | Thread Index | Old Index