OSDN Git Service

crypto: talitos - HMAC SNOOP NO AFEU mode requires SW icv checking.
[android-x86/kernel.git] / block / bio-integrity.c
index f70cc3b..80dedde 100644 (file)
@@ -86,7 +86,7 @@ struct bio_integrity_payload *bio_integrity_alloc(struct bio *bio,
 
        bip->bip_bio = bio;
        bio->bi_integrity = bip;
-       bio->bi_rw |= REQ_INTEGRITY;
+       bio->bi_opf |= REQ_INTEGRITY;
 
        return bip;
 err:
@@ -175,6 +175,9 @@ bool bio_integrity_enabled(struct bio *bio)
        if (!bio_is_rw(bio))
                return false;
 
+       if (!bio_sectors(bio))
+               return false;
+
        /* Already protected? */
        if (bio_integrity(bio))
                return false;