aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-12-02 00:32:09 -0600
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 11:24:21 -0600
commitcfeb2cf957ca5b4e557b53fb91ccc52f442f6dbe (patch)
tree71e1ccecf6626c09f42ae1f324809e504dc60a36 /drivers/scsi/libiscsi.c
parente2bac7c55e43c9018f2f4daf15437e836b26e709 (diff)
downloadkernel_samsung_smdk4412-cfeb2cf957ca5b4e557b53fb91ccc52f442f6dbe.zip
kernel_samsung_smdk4412-cfeb2cf957ca5b4e557b53fb91ccc52f442f6dbe.tar.gz
kernel_samsung_smdk4412-cfeb2cf957ca5b4e557b53fb91ccc52f442f6dbe.tar.bz2
[SCSI] libiscsi: change login data buffer allocation
This modifies the login buffer allocation to use __get_free_pages. It will allow drivers that want to send this data with zero copy operations to easily line things up on page boundaries. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r--drivers/scsi/libiscsi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 80cbcdc..c1bb740 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -2284,7 +2284,8 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, int dd_size,
}
spin_unlock_bh(&session->lock);
- data = kmalloc(ISCSI_DEF_MAX_RECV_SEG_LEN, GFP_KERNEL);
+ data = (char *) __get_free_pages(GFP_KERNEL,
+ get_order(ISCSI_DEF_MAX_RECV_SEG_LEN));
if (!data)
goto login_task_data_alloc_fail;
conn->login_task->data = conn->data = data;
@@ -2355,7 +2356,8 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn)
iscsi_suspend_tx(conn);
spin_lock_bh(&session->lock);
- kfree(conn->data);
+ free_pages((unsigned long) conn->data,
+ get_order(ISCSI_DEF_MAX_RECV_SEG_LEN));
kfree(conn->persistent_address);
__kfifo_put(session->cmdpool.queue, (void*)&conn->login_task,
sizeof(void*));