Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Use brelsel while the bufcache_lock is held rather ...
details: https://anonhg.NetBSD.org/src/rev/50d15f91fc73
branches: trunk
changeset: 352215:50d15f91fc73
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Mar 21 10:46:49 2017 +0000
description:
Use brelsel while the bufcache_lock is held rather than dropping it
and re-taking / dropping it in brelse
diffstat:
sys/kern/vfs_bio.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 8bb062bc76d0 -r 50d15f91fc73 sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c Tue Mar 21 10:39:52 2017 +0000
+++ b/sys/kern/vfs_bio.c Tue Mar 21 10:46:49 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_bio.c,v 1.270 2017/03/18 05:45:48 riastradh Exp $ */
+/* $NetBSD: vfs_bio.c,v 1.271 2017/03/21 10:46:49 skrll Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -123,7 +123,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.270 2017/03/18 05:45:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.271 2017/03/21 10:46:49 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_bufcache.h"
@@ -1230,8 +1230,8 @@
if (allocbuf(bp, size, preserve)) {
mutex_enter(&bufcache_lock);
LIST_REMOVE(bp, b_hash);
+ brelsel(bp, BC_INVAL);
mutex_exit(&bufcache_lock);
- brelse(bp, BC_INVAL);
return NULL;
}
}
Home |
Main Index |
Thread Index |
Old Index