]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
t10-pi: provide empty t10_pi_complete() for !CONFIG_BLK_DEV_INTEGRITY
authorJens Axboe <axboe@kernel.dk>
Tue, 31 Jul 2018 15:10:26 +0000 (09:10 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 31 Jul 2018 15:10:26 +0000 (09:10 -0600)
Fixes a link failure whtn BLK_DEV_INTEGRITY isn't defined.

Fixes: 10c41ddd6132 ("block: move dif_prepare/dif_complete functions to block layer")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/t10-pi.h

index 5a427c289f58bd675dacc0ba65e224ead76b09ca..b9626aa7e90c67e1ecfa38d07d9a4754213313d0 100644 (file)
@@ -51,8 +51,19 @@ extern const struct blk_integrity_profile t10_pi_type1_crc;
 extern const struct blk_integrity_profile t10_pi_type1_ip;
 extern const struct blk_integrity_profile t10_pi_type3_crc;
 extern const struct blk_integrity_profile t10_pi_type3_ip;
+
+#ifdef CONFIG_BLK_DEV_INTEGRITY
 extern void t10_pi_prepare(struct request *rq, u8 protection_type);
 extern void t10_pi_complete(struct request *rq, u8 protection_type,
                            unsigned int intervals);
+#else
+static inline void t10_pi_complete(struct request *rq, u8 protection_type,
+                                  unsigned int intervals)
+{
+}
+static inline void t10_pi_prepare(struct request *rq, u8 protection_type)
+{
+}
+#endif
 
 #endif