DragonFlyBSD Kernel Audit
DF-1743 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/raid/vinum/vinumioctl.c b/sys/dev/raid/vinum/vinumioctl.c
--- a/sys/dev/raid/vinum/vinumioctl.c
+++ b/sys/dev/raid/vinum/vinumioctl.c
@@ -436,14 +436,15 @@
 		drive->reads = 0;			    /* number of reads on this drive */
 		drive->writes = 0;			    /* number of writes on this drive */
 		drive->bytes_read = 0;			    /* number of bytes read */
-		drive->bytes_written = 0;		    /* number of bytes written */
-		reply->error = 0;
-		return;
-	    }
-	    reply->error = EINVAL;
-	    return;
-	}
-    case sd_object:
+		drive->bytes_written = 0;		    /* number of bytes written */
+		reply->error = 0;
+		return;
+	    }
+	    reply->error = EINVAL;
+	    return;
+	}
+	break;
+    case sd_object:
 	if (msg->index < vinum_conf.subdisks_allocated) {
 	    struct sd *sd = &SD[msg->index];
 	    if (sd->state > sd_referenced) {