Commit d442cc44 authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Linus Torvalds

block: Trivial fix for blk_integrity_rq()

Fail integrity check gracefully when request does not have a bio
attached (BLOCK_PC).
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8df1b049
......@@ -985,6 +985,9 @@ static inline int bdev_integrity_enabled(struct block_device *bdev, int rw)
static inline int blk_integrity_rq(struct request *rq)
{
if (rq->bio == NULL)
return 0;
return bio_integrity(rq->bio);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment