mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
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
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user