diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-06-18 04:15:02 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-07-03 07:21:14 -0400 |
commit | 6e2401ad6f33de15ff00f78b88159f00a14f3b35 (patch) | |
tree | 7dbcb7e08703745a9a60de77114d82e2385f7c6a /include/linux/bio.h | |
parent | da9cbc87395308a21465bd25441297bbba0477e1 (diff) |
block: integrity cleanups
- No need to check for NULL bio, we'll get an immediate oops anyway.
- Make bio_integrity() a proper function.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 6bfc3e8d9d89..0933a14e6414 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -458,7 +458,14 @@ static inline char *__bio_kmap_irq(struct bio *bio, unsigned short idx, | |||
458 | #define bip_for_each_vec(bvl, bip, i) \ | 458 | #define bip_for_each_vec(bvl, bip, i) \ |
459 | __bip_for_each_vec(bvl, bip, i, (bip)->bip_idx) | 459 | __bip_for_each_vec(bvl, bip, i, (bip)->bip_idx) |
460 | 460 | ||
461 | #define bio_integrity(bio) ((bio)->bi_integrity ? 1 : 0) | 461 | static inline int bio_integrity(struct bio *bio) |
462 | { | ||
463 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
464 | return bio->bi_integrity != NULL; | ||
465 | #else | ||
466 | return 0; | ||
467 | #endif | ||
468 | } | ||
462 | 469 | ||
463 | extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *); | 470 | extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *); |
464 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); | 471 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); |