diff options
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r-- | sys/scsi/sd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 33e41e1c884..ddd0e38f43d 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.76 2005/05/01 19:29:17 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.77 2005/05/03 00:29:16 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -549,13 +549,6 @@ sdstrategy(bp) SC_DEBUG(sd->sc_link, SDEV_DB2, ("sdstrategy: %ld bytes @ blk %d\n", bp->b_bcount, bp->b_blkno)); /* - * The transfer must be a whole number of blocks. - */ - if ((bp->b_bcount % sd->sc_dk.dk_label->d_secsize) != 0) { - bp->b_error = EINVAL; - goto bad; - } - /* * If the device has been made invalid, error out */ if ((sd->sc_link->flags & SDEV_MEDIA_LOADED) == 0) { @@ -572,6 +565,13 @@ sdstrategy(bp) goto done; /* + * The transfer must be a whole number of blocks. + */ + if ((bp->b_bcount % sd->sc_dk.dk_label->d_secsize) != 0) { + bp->b_error = EINVAL; + goto bad; + } + /* * Do bounds checking, adjust transfer. if error, process. * If end of partition, just return. */ |