]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - block/bio-integrity.c
compat_ioctl: block: handle Persistent Reservations
[mirror_ubuntu-bionic-kernel.git] / block / bio-integrity.c
index 23b42e8aa03e7b327bc538350b91d41e880e5d45..bacca4b2bdcbc7e54d816ece89921e2f8b4096fa 100644 (file)
@@ -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;