lkml.org 
[lkml]   [2008]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] block: Trivial fix for blk_integrity_rq()
From
Date

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);
}


\
 
 \ /
  Last update: 2008-07-16 22:13    [W:0.030 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site