From c536f01094e83d26340dd78eecc7e509d9de61a6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 9 Sep 2021 02:57:47 +0000 Subject: [PATCH 1/2] qla2x00t-32gbit/Makefile_in-tree: Add qla_edif.o Reported-by: Sietse van Zanen git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9575 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/Makefile_in-tree | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qla2x00t-32gbit/Makefile_in-tree b/qla2x00t-32gbit/Makefile_in-tree index 9017a0a6e..d6f65c407 100644 --- a/qla2x00t-32gbit/Makefile_in-tree +++ b/qla2x00t-32gbit/Makefile_in-tree @@ -1,8 +1,10 @@ # SPDX-License-Identifier: GPL-2.0 -qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \ +qla2xxx-y := \ + qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \ qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o qla_bsg.o \ - qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o qla_nvme.o + qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o qla_nvme.o \ + qla_edif.o qla2x00tgt-objs := qla_tgt.o scst_qla2xxx.o obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx.o From 13c644901617ac8fa8df546fc2b31c0ecb459f37 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 9 Sep 2021 03:22:31 +0000 Subject: [PATCH 2/2] scst_vdisk: Fix bio_integrity_alloc() error checking In 2015 bio_integrity_alloc() was modified such that it returns an error pointer instead of NULL upon failure. Hence this patch. See also upstream commit 06c1e3902aa7 ("blk-integrity: empty implementation when disabled"; v4.5). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9576 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 4522c8fb3..b2137e67a 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -5933,7 +5933,7 @@ static void vdisk_blk_add_dif(struct bio *bio, gfp_t gfp_mask, } bip = bio_integrity_alloc(bio, gfp_mask, pages); - if (unlikely(bip == NULL)) { + if (unlikely(IS_ERR_OR_NULL(bip))) { PRINT_WARNING("Allocation of %d pages for DIF tags " "failed! (dev %s)", pages, dev->virt_name); goto out; /* proceed without integrity */