]> git.baikalelectronics.ru Git - kernel.git/commit
blk-integrity: empty implementation when disabled
authorKeith Busch <keith.busch@intel.com>
Thu, 3 Dec 2015 16:32:21 +0000 (09:32 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 3 Dec 2015 16:32:21 +0000 (09:32 -0700)
commit536cac57a746a0bd20297b7a4e4c2dbf5e21b0e7
tree92372a5b1038eaa0ccbea92bf5f8625734ffd98f
parent9dcfe06db4e8238c02b9aa26a4289ba414e67905
blk-integrity: empty implementation when disabled

This patch moves the blk_integrity_payload definition outside the
CONFIG_BLK_DEV_INTERITY dependency and provides empty function
implementations when the kernel configuration disables integrity
extensions. This simplifies drivers that make use of these to map user
data so they don't need to repeat the same configuration checks.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Updated by Jens to pass an error pointer return from
bio_integrity_alloc(), otherwise if CONFIG_BLK_DEV_INTEGRITY isn't
set, we return a weird ENOMEM from __nvme_submit_user_cmd()
if a meta buffer is set.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/bio-integrity.c
drivers/nvme/host/core.c
drivers/target/target_core_iblock.c
include/linux/bio.h