diff options
-rw-r--r-- | fs/bio-integrity.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c index b355b98dbf1b..1c2ce0c87711 100644 --- a/fs/bio-integrity.c +++ b/fs/bio-integrity.c | |||
@@ -182,6 +182,9 @@ static int bdev_integrity_enabled(struct block_device *bdev, int rw) | |||
182 | */ | 182 | */ |
183 | int bio_integrity_enabled(struct bio *bio) | 183 | int bio_integrity_enabled(struct bio *bio) |
184 | { | 184 | { |
185 | if (!bio_is_rw(bio)) | ||
186 | return 0; | ||
187 | |||
185 | /* Already protected? */ | 188 | /* Already protected? */ |
186 | if (bio_integrity(bio)) | 189 | if (bio_integrity(bio)) |
187 | return 0; | 190 | return 0; |