Description: Fix source to compile with 4.3+ kernels
  commit 4246a0b63bd8f56a1469b12eafeb875b1041a451
    block: add a bi_error field to struct bio
  -> Removes BIO_UPTODATE and error argument to bio_endio.
  commit b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c
    block: remove bio_get_nr_vecs()
  -> Removed that call (always use BIO_MAX_PAGES)
  commit 676d23690fb62b5d51ba5d659935e9f7d9da9f8e
    net: Fix use after free by removing length arg from sk_data_ready callbacks.
  -> Removes len argument from sk_data_ready() callback.
Author: Stefan Bader <stefan.bader@canonical.com>

Index: iscsitarget-1.4.20.3+svn502/kernel/block-io.c
===================================================================
--- iscsitarget-1.4.20.3+svn502.orig/kernel/block-io.c	2014-05-06 22:59:55.000000000 +0200
+++ iscsitarget-1.4.20.3+svn502/kernel/block-io.c	2015-11-23 19:25:01.818683572 +0100
@@ -29,14 +29,12 @@ struct tio_work {
 	struct completion tio_complete;
 };
 
-static void blockio_bio_endio(struct bio *bio, int error)
+static void blockio_bio_endio(struct bio *bio)
 {
 	struct tio_work *tio_work = bio->bi_private;
 
-	error = test_bit(BIO_UPTODATE, &bio->bi_flags) ? error : -EIO;
-
-	if (error)
-		atomic_set(&tio_work->error, error);
+	if (bio->bi_error)
+		atomic_set(&tio_work->error, bio->bi_error);
 
 	/* If last bio signal completion */
 	if (atomic_dec_and_test(&tio_work->bios_remaining))
@@ -61,15 +59,11 @@ blockio_make_request(struct iet_volume *
 	u32 size = tio->size;
 	u32 tio_index = 0;
 
-	int max_pages = 1;
+	int max_pages = bdev_q ? BIO_MAX_PAGES : 1;
 	int err = 0;
 
 	loff_t ppos = tio->offset;
 
-	/* Calculate max_pages for bio_alloc (memory saver) */
-	if (bdev_q)
-		max_pages = bio_get_nr_vecs(bio_data->bdev);
-
 	tio_work = kzalloc(sizeof (*tio_work), GFP_KERNEL);
 	if (!tio_work)
 		return -ENOMEM;
Index: iscsitarget-1.4.20.3+svn502/kernel/conn.c
===================================================================
--- iscsitarget-1.4.20.3+svn502.orig/kernel/conn.c	2015-11-23 18:59:14.000000000 +0100
+++ iscsitarget-1.4.20.3+svn502/kernel/conn.c	2015-11-23 19:14:46.974693052 +0100
@@ -87,13 +87,13 @@ static void iet_state_change(struct sock
 	target->nthread_info.old_state_change(sk);
 }
 
-static void iet_data_ready(struct sock *sk, int len)
+static void iet_data_ready(struct sock *sk)
 {
 	struct iscsi_conn *conn = sk->sk_user_data;
 	struct iscsi_target *target = conn->session->target;
 
 	nthread_wakeup(target);
-	target->nthread_info.old_data_ready(sk, len);
+	target->nthread_info.old_data_ready(sk);
 }
 
 /*
Index: iscsitarget-1.4.20.3+svn502/kernel/iscsi.h
===================================================================
--- iscsitarget-1.4.20.3+svn502.orig/kernel/iscsi.h	2014-05-06 22:59:55.000000000 +0200
+++ iscsitarget-1.4.20.3+svn502/kernel/iscsi.h	2015-11-23 19:14:22.942693422 +0100
@@ -81,7 +81,7 @@ struct network_thread_info {
 	spinlock_t nthread_lock;
 
 	void (*old_state_change)(struct sock *);
-	void (*old_data_ready)(struct sock *, int);
+	void (*old_data_ready)(struct sock *);
 	void (*old_write_space)(struct sock *);
 };
 
