svn commit: r296592 - head/sys/dev/amr

Warner Losh imp at FreeBSD.org
Thu Mar 10 00:36:54 UTC 2016


Author: imp
Date: Thu Mar 10 00:36:52 2016
New Revision: 296592
URL: https://svnweb.freebsd.org/changeset/base/296592

Log:
  Don't assume that bio_cmd is a bitfield.
  
  Differential revision: https://reviews.freebsd.org/D5590

Modified:
  head/sys/dev/amr/amr.c

Modified: head/sys/dev/amr/amr.c
==============================================================================
--- head/sys/dev/amr/amr.c	Thu Mar 10 00:36:45 2016	(r296591)
+++ head/sys/dev/amr/amr.c	Thu Mar 10 00:36:52 2016	(r296592)
@@ -1319,7 +1319,7 @@ amr_bio_command(struct amr_softc *sc, st
     blkcount = (bio->bio_bcount + AMR_BLKSIZE - 1) / AMR_BLKSIZE;
 
     ac->ac_mailbox.mb_command = cmd;
-    if (bio->bio_cmd & (BIO_READ|BIO_WRITE)) {
+    if (bio->bio_cmd == BIO_READ || bio->bio_cmd == BIO_WRITE) {
 	ac->ac_mailbox.mb_blkcount = blkcount;
 	ac->ac_mailbox.mb_lba = bio->bio_pblkno;
 	if ((bio->bio_pblkno + blkcount) > sc->amr_drive[driveno].al_size) {


More information about the svn-src-head mailing list