Module Name: src
Committed By: skrll
Date: Tue Mar 21 10:46:49 UTC 2017
Modified Files:
src/sys/kern: vfs_bio.c
Log Message:
Use brelsel while the bufcache_lock is held rather than dropping it
and re-taking / dropping it in brelse
To generate a diff of this commit:
cvs rdiff -u -r1.270 -r1.271 src/sys/kern/vfs_bio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/vfs_bio.c
diff -u src/sys/kern/vfs_bio.c:1.270 src/sys/kern/vfs_bio.c:1.271
--- src/sys/kern/vfs_bio.c:1.270 Sat Mar 18 05:45:48 2017
+++ src/sys/kern/vfs_bio.c Tue Mar 21 10:46:49 2017
@@ -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 @@ getblk(struct vnode *vp, daddr_t blkno,
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;
}
}