aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-07-31 09:10:26 -0600
committerJens Axboe <axboe@kernel.dk>2018-07-31 09:10:26 -0600
commit08fcf813281ebcf72c69487c1501ad91b7121cdb (patch)
tree9221534561c55fe80cd23c38f59a87f52e7e2967
parentblock: blk_init_allocated_queue() set q->fq as NULL in the fail case (diff)
downloadlinux-dev-08fcf813281ebcf72c69487c1501ad91b7121cdb.tar.xz
linux-dev-08fcf813281ebcf72c69487c1501ad91b7121cdb.zip
t10-pi: provide empty t10_pi_complete() for !CONFIG_BLK_DEV_INTEGRITY
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>
-rw-r--r--include/linux/t10-pi.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/t10-pi.h b/include/linux/t10-pi.h
index 5a427c289f58..b9626aa7e90c 100644
--- a/include/linux/t10-pi.h
+++ b/include/linux/t10-pi.h
@@ -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