summaryrefslogtreecommitdiffstats
path: root/block/bio-integrity.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-12 08:18:10 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-12 08:18:10 +0200
commit069a0f32c9ca75ec7f02146711ec1f5840a68cbf (patch)
tree0ee4fe0bdd706333192b26a0c43dda1481862bae /block/bio-integrity.c
parentaca4e68acf3a08561f2a413322cbb232edad8764 (diff)
parent32c1431eea4881a6b17bd7c639315010aeefa452 (diff)
downloadop-kernel-dev-069a0f32c9ca75ec7f02146711ec1f5840a68cbf.zip
op-kernel-dev-069a0f32c9ca75ec7f02146711ec1f5840a68cbf.tar.gz
Merge 4.12-rc5 into char-misc-next
We want the char/misc driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/bio-integrity.c')
-rw-r--r--block/bio-integrity.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 5384713..b5009a8 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -175,6 +175,9 @@ bool bio_integrity_enabled(struct bio *bio)
if (bio_op(bio) != REQ_OP_READ && bio_op(bio) != REQ_OP_WRITE)
return false;
+ if (!bio_sectors(bio))
+ return false;
+
/* Already protected? */
if (bio_integrity(bio))
return false;
OpenPOWER on IntegriCloud