diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2009-08-09 14:12:26 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2009-08-09 14:12:26 +0000 |
commit | 7b05469e81411324822db473427cc3b7ba400e9f (patch) | |
tree | 61daea5c42b443efecf476ea4dd8a0dc2d47338d /sys/dev/softraid_crypto.c | |
parent | f7447304c5149566f2f214be68f03fbf69aff793 (diff) |
Switch softraid to vnodes to prevent bad things from happening when using
d_open/d_close.
tested by many, ok jsing, thib, krw
Diffstat (limited to 'sys/dev/softraid_crypto.c')
-rw-r--r-- | sys/dev/softraid_crypto.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c index ac6ffa35904..8bd2adaef42 100644 --- a/sys/dev/softraid_crypto.c +++ b/sys/dev/softraid_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_crypto.c,v 1.39 2009/06/11 19:42:59 marco Exp $ */ +/* $OpenBSD: softraid_crypto.c,v 1.40 2009/08/09 14:12:25 marco Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org> @@ -597,7 +597,9 @@ sr_crypto_rw2(struct sr_workunit *wu, struct cryptop *crp) ccb->ccb_wu = wu; ccb->ccb_target = 0; ccb->ccb_buf.b_dev = sd->sd_vol.sv_chunks[0]->src_dev_mm; - ccb->ccb_buf.b_vp = NULL; + ccb->ccb_buf.b_vp = sd->sd_vol.sv_chunks[0]->src_vn; + if ((ccb->ccb_buf.b_flags & B_READ) == 0) + ccb->ccb_buf.b_vp->v_numoutput++; LIST_INIT(&ccb->ccb_buf.b_dep); |