aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_iblock.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2015-03-27 23:14:16 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2015-04-07 23:27:44 -0700
commit6f16ec43e06e37dc5c3bed52ae76803c13ee2f8c (patch)
tree9d6b619bccedb03e879648e98dc3806e7666be57 /drivers/target/target_core_iblock.c
parenttarget/file: Add checks for backend DIF emulation (diff)
downloadlinux-dev-6f16ec43e06e37dc5c3bed52ae76803c13ee2f8c.tar.xz
linux-dev-6f16ec43e06e37dc5c3bed52ae76803c13ee2f8c.zip
target/iblock: Add checks for backend DIF emulation
Make sure that IBLOCK only attempts to use backend DIF emulation when it's actually enabled at device level. Cc: Martin Petersen <martin.petersen@oracle.com> Cc: Sagi Grimberg <sagig@mellanox.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_iblock.c')
-rw-r--r--drivers/target/target_core_iblock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index 2520cbfba524..1b7947c2510f 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -774,7 +774,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
sg_num--;
}
- if (cmd->prot_type) {
+ if (cmd->prot_type && dev->dev_attrib.pi_prot_type) {
int rc = iblock_alloc_bip(cmd, bio_start);
if (rc)
goto fail_put_bios;