* [PATCH] block: Trivial fix for blk_integrity_rq()
@ 2008-07-16 20:09 Martin K. Petersen
0 siblings, 0 replies; only message in thread
From: Martin K. Petersen @ 2008-07-16 20:09 UTC (permalink / raw)
To: Linus Torvalds, jens.axboe, linux-kernel
Fail integrity check gracefully when request does not have a bio
attached (BLOCK_PC).
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
PS. Jens is out for a couple of weeks. Hence the direct submission.
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -985,6 +985,9 @@ static inline int bdev_integrity_enabled
static inline int blk_integrity_rq(struct request *rq)
{
+ if (rq->bio == NULL)
+ return 0;
+
return bio_integrity(rq->bio);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-16 20:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-16 20:09 [PATCH] block: Trivial fix for blk_integrity_rq() Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®