summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_crypto.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2016-05-21 14:19:04 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2016-05-21 14:19:04 +0000
commit812aa871e53f637922ab3350e925a5672e42b42c (patch)
treed5288a11570d79fe6924b4191982d328ab81f193 /sys/dev/softraid_crypto.c
parent6b11f53b9636b18d5d1b70c74065f7f51957a766 (diff)
Remove another erroneous VOP_CLOSE/vput, which was missed with the last
commit. While here, also be consistent with the goto labels used.
Diffstat (limited to 'sys/dev/softraid_crypto.c')
-rw-r--r--sys/dev/softraid_crypto.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c
index 2dc2ab6f2ee..45782b8227c 100644
--- a/sys/dev/softraid_crypto.c
+++ b/sys/dev/softraid_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_crypto.c,v 1.127 2016/05/17 19:28:59 tedu Exp $ */
+/* $OpenBSD: softraid_crypto.c,v 1.128 2016/05/21 14:19:03 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org>
@@ -636,7 +636,7 @@ sr_crypto_create_key_disk(struct sr_discipline *sd, dev_t dev)
DNPRINTF(SR_D_META,"%s: sr_crypto_create_key_disk cannot "
"open %s\n", DEVNAME(sc), devname);
vput(vn);
- goto fail;
+ goto done;
}
open = 1; /* close dev on error */
@@ -646,12 +646,12 @@ sr_crypto_create_key_disk(struct sr_discipline *sd, dev_t dev)
FREAD, NOCRED, curproc)) {
DNPRINTF(SR_D_META, "%s: sr_crypto_create_key_disk ioctl "
"failed\n", DEVNAME(sc));
- goto fail;
+ goto done;
}
if (label.d_partitions[part].p_fstype != FS_RAID) {
sr_error(sc, "%s partition not of type RAID (%d)",
devname, label.d_partitions[part].p_fstype);
- goto fail;
+ goto done;
}
/*
@@ -809,8 +809,6 @@ sr_crypto_read_key_disk(struct sr_discipline *sd, dev_t dev)
NOCRED, curproc)) {
DNPRINTF(SR_D_META, "%s: sr_crypto_read_key_disk ioctl "
"failed\n", DEVNAME(sc));
- VOP_CLOSE(vn, FREAD | FWRITE, NOCRED, curproc);
- vput(vn);
goto done;
}
if (label.d_partitions[part].p_fstype != FS_RAID) {