aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
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 80cbcdce7fa3..c1bb74052aed 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,
2284 } 2284 }
2285 spin_unlock_bh(&session->lock); 2285 spin_unlock_bh(&session->lock);
2286 2286
2287 data = kmalloc(ISCSI_DEF_MAX_RECV_SEG_LEN, GFP_KERNEL); 2287 data = (char *) __get_free_pages(GFP_KERNEL,
2288 get_order(ISCSI_DEF_MAX_RECV_SEG_LEN));
2288 if (!data) 2289 if (!data)
2289 goto login_task_data_alloc_fail; 2290 goto login_task_data_alloc_fail;
2290 conn->login_task->data = conn->data = data; 2291 conn->login_task->data = conn->data = data;
@@ -2355,7 +2356,8 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn)
2355 iscsi_suspend_tx(conn); 2356 iscsi_suspend_tx(conn);
2356 2357
2357 spin_lock_bh(&session->lock); 2358 spin_lock_bh(&session->lock);
2358 kfree(conn->data); 2359 free_pages((unsigned long) conn->data,
2360 get_order(ISCSI_DEF_MAX_RECV_SEG_LEN));
2359 kfree(conn->persistent_address); 2361 kfree(conn->persistent_address);
2360 __kfifo_put(session->cmdpool.queue, (void*)&conn->login_task, 2362 __kfifo_put(session->cmdpool.queue, (void*)&conn->login_task,
2361 sizeof(void*)); 2363 sizeof(void*));