projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bc6997
)
block: Ensure we only enable integrity metadata for reads and writes
author
Martin K. Petersen
<
[email protected]
>
Wed, 9 Apr 2014 02:59:31 +0000
(22:59 -0400)
committer
Jens Axboe
<
[email protected]
>
Wed, 9 Apr 2014 14:00:06 +0000
(08:00 -0600)
We'd occasionally attempt to generate protection information for flushes
and other requests with a zero payload. Make sure we only attempt to
enable integrity for reads and writes.
Signed-off-by: Martin K. Petersen <
[email protected]
>
Signed-off-by: Jens Axboe <
[email protected]
>
fs/bio-integrity.c
patch
|
blob
|
history
diff --git
a/fs/bio-integrity.c
b/fs/bio-integrity.c
index b355b98dbf1b4dcf8d0ce70683af0d97db5c3e59..1c2ce0c8771133194ecb9d91517a7dd67c571765 100644
(file)
--- 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)
*/
int bio_integrity_enabled(struct bio *bio)
{
+ if (!bio_is_rw(bio))
+ return 0;
+
/* Already protected? */
if (bio_integrity(bio))
return 0;