Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix lock order statement. Annotate with references...
details: https://anonhg.NetBSD.org/src/rev/3d0d9b45cbb4
branches: trunk
changeset: 822412:3d0d9b45cbb4
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Mar 18 22:02:11 2017 +0000
description:
Fix lock order statement. Annotate with references to examples.
diffstat:
sys/kern/vfs_cache.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r afc5279a7f97 -r 3d0d9b45cbb4 sys/kern/vfs_cache.c
--- a/sys/kern/vfs_cache.c Sat Mar 18 21:21:24 2017 +0000
+++ b/sys/kern/vfs_cache.c Sat Mar 18 22:02:11 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_cache.c,v 1.117 2017/03/18 21:03:28 riastradh Exp $ */
+/* $NetBSD: vfs_cache.c,v 1.118 2017/03/18 22:02:11 riastradh Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.117 2017/03/18 21:03:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.118 2017/03/18 22:02:11 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -110,7 +110,12 @@
* N struct namecache::nc_lock Per-entry lock.
* V struct vnode::v_interlock Vnode interlock.
*
- * Lock order: C -> N -> L -> V
+ * Lock order: L -> C -> N -> V
+ *
+ * Examples:
+ * . L->C: cache_reclaim
+ * . C->N->V: cache_lookup
+ * . L->N->V: cache_purge1, cache_revlookup
*
* All use serialized by namecache_lock:
*
Home |
Main Index |
Thread Index |
Old Index