Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dkwedge revert the previous
details: https://anonhg.NetBSD.org/src/rev/4e9ffba084ac
branches: trunk
changeset: 340087:4e9ffba084ac
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sat Aug 22 07:42:46 2015 +0000
description:
revert the previous
diffstat:
sys/dev/dkwedge/dk.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diffs (50 lines):
diff -r cfd0b9b9d8cc -r 4e9ffba084ac sys/dev/dkwedge/dk.c
--- a/sys/dev/dkwedge/dk.c Sat Aug 22 05:45:57 2015 +0000
+++ b/sys/dev/dkwedge/dk.c Sat Aug 22 07:42:46 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dk.c,v 1.80 2015/08/20 23:08:33 mlelstv Exp $ */
+/* $NetBSD: dk.c,v 1.81 2015/08/22 07:42:46 mlelstv Exp $ */
/*-
* Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.80 2015/08/20 23:08:33 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.81 2015/08/22 07:42:46 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_dkwedge.h"
@@ -944,7 +944,7 @@
void *tbuf, size_t len)
{
buf_t *bp;
- int error, isopen;
+ int error;
/*
* The kernel cannot read from a character device vnode
@@ -964,12 +964,6 @@
bp->b_cylinder = 0;
bp->b_error = 0;
- /*
- * XXX Only the last user of a block device can close it.
- * There is no reference counting in the driver.
- */
- isopen = pdk->dk_bopenmask & (1 << DISKPART(bp->b_dev));
-
error = bdev_open(bp->b_dev, FREAD, S_IFBLK, curlwp);
if (error)
return error;
@@ -978,8 +972,7 @@
error = biowait(bp);
putiobuf(bp);
- if (!isopen)
- bdev_close(bp->b_dev, FREAD, S_IFBLK, curlwp);
+ bdev_close(bp->b_dev, FREAD, S_IFBLK, curlwp);
return error;
}
Home |
Main Index |
Thread Index |
Old Index