summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-01-20 00:11:50 +0000
committerjsing <jsing@openbsd.org>2014-01-20 00:11:50 +0000
commit2b887710e2e9705c519081e6fb52806fe2c1f3f3 (patch)
treec8d1079f5d9269419d2ea6210b35697d35e8bc22 /sys/dev/softraid.c
parentmemleak; found by Loganaden Velvindron @ AfriNIC; ok markus@ (diff)
downloadwireguard-openbsd-2b887710e2e9705c519081e6fb52806fe2c1f3f3.tar.xz
wireguard-openbsd-2b887710e2e9705c519081e6fb52806fe2c1f3f3.zip
Replace dedicated swu_fake variable with a work unit flag.
ok krw@
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r--sys/dev/softraid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 13c78276c4e..492db2dd3a5 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.319 2014/01/19 22:21:39 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.320 2014/01/20 00:11:50 jsing Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -721,7 +721,7 @@ restart:
/* not all disciplines have sync */
if (sd->sd_scsi_sync) {
bzero(&wu, sizeof(wu));
- wu.swu_fake = 1;
+ wu.swu_flags |= SR_WUF_FAKE;
wu.swu_dis = sd;
sd->sd_scsi_sync(&wu);
}
@@ -4110,7 +4110,7 @@ sr_raid_sync(struct sr_workunit *wu)
DNPRINTF(SR_D_DIS, "%s: sr_raid_sync\n", DEVNAME(sd->sd_sc));
/* when doing a fake sync don't count the wu */
- ios = wu->swu_fake ? 0 : 1;
+ ios = (wu->swu_flags & SR_WUF_FAKE) ? 0 : 1;
s = splbio();
sd->sd_sync = 1;