Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev No need to detach (and return EBUSY) if dk_openmask ...
details: https://anonhg.NetBSD.org/src/rev/0448f8c3b0e0
branches: trunk
changeset: 327660:0448f8c3b0e0
user: hannken <hannken%NetBSD.org@localhost>
date: Thu Mar 13 10:22:35 2014 +0000
description:
No need to detach (and return EBUSY) if dk_openmask is non-zero.
diffstat:
sys/dev/md.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 5ad52f452fa0 -r 0448f8c3b0e0 sys/dev/md.c
--- a/sys/dev/md.c Thu Mar 13 09:13:32 2014 +0000
+++ b/sys/dev/md.c Thu Mar 13 10:22:35 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.67 2012/06/30 10:52:31 tsutsui Exp $ */
+/* $NetBSD: md.c,v 1.68 2014/03/13 10:22:35 hannken Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.67 2012/06/30 10:52:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.68 2014/03/13 10:22:35 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_md.h"
@@ -340,6 +340,10 @@
break;
}
dk->dk_openmask = dk->dk_copenmask | dk->dk_bopenmask;
+ if (dk->dk_openmask != 0) {
+ mutex_exit(&dk->dk_openlock);
+ return 0;
+ }
mutex_exit(&dk->dk_openlock);
Home |
Main Index |
Thread Index |
Old Index