X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=block%2Fbio-integrity.c;h=bacca4b2bdcbc7e54d816ece89921e2f8b4096fa;hb=ca7147e06b5a2a1df5c753b08f56c62162ef71a5;hp=23b42e8aa03e7b327bc538350b91d41e880e5d45;hpb=14b661ebb6cfa386afa5a5247eb09e24d420af3a;p=mirror_ubuntu-bionic-kernel.git diff --git a/block/bio-integrity.c b/block/bio-integrity.c index 23b42e8aa03e..bacca4b2bdcb 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c @@ -313,8 +313,12 @@ bool bio_integrity_prep(struct bio *bio) ret = bio_integrity_add_page(bio, virt_to_page(buf), bytes, offset); - if (ret == 0) - return false; + if (ret == 0) { + printk(KERN_ERR "could not attach integrity payload\n"); + kfree(buf); + status = BLK_STS_RESOURCE; + goto err_end_io; + } if (ret < bytes) break;