diff mbox

[1/2] UBUNTU: SAUCE: hio: set bi_error field to signal an I/O error on a BIO

Message ID 1478195304-14547-2-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa Nov. 3, 2016, 5:48 p.m. UTC
BugLink: http://bugs.launchpad.net/bugs/1638700

The hio driver needs to accommodate handling the following which was
introduced in 4.3-rc1:

  commit 4246a0b63bd8f56a1469b12eafeb875b1041a451
  Author: Christoph Hellwig <hch@lst.de>
  Date:   Mon Jul 20 15:29:37 2015 +0200

    block: add a bi_error field to struct bio

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
---
 ubuntu/hio/hio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/ubuntu/hio/hio.c b/ubuntu/hio/hio.c
index e3d161f..25554c0 100644
--- a/ubuntu/hio/hio.c
+++ b/ubuntu/hio/hio.c
@@ -61,7 +61,8 @@ 
 #include <linux/devfs_fs_kernel.h>
 #endif
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0))
-#define bio_endio(bio, errors) bio_endio(bio)
+#define bio_endio(bio, errors)	\
+	do { bio->bi_error = errors; bio_endio(bio); } while (0)
 #endif
 
 /* driver */