diff options
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 491845f18710..f79a457099e6 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -1998,8 +1998,7 @@ iscsi_r2tpool_alloc(struct iscsi_session *session) | |||
1998 | */ | 1998 | */ |
1999 | 1999 | ||
2000 | /* R2T pool */ | 2000 | /* R2T pool */ |
2001 | if (iscsi_pool_init(&tcp_ctask->r2tpool, session->max_r2t * 4, | 2001 | if (iscsi_pool_init(&tcp_ctask->r2tpool, session->max_r2t * 4, NULL, |
2002 | (void***)&tcp_ctask->r2ts, | ||
2003 | sizeof(struct iscsi_r2t_info))) { | 2002 | sizeof(struct iscsi_r2t_info))) { |
2004 | goto r2t_alloc_fail; | 2003 | goto r2t_alloc_fail; |
2005 | } | 2004 | } |
@@ -2008,8 +2007,7 @@ iscsi_r2tpool_alloc(struct iscsi_session *session) | |||
2008 | tcp_ctask->r2tqueue = kfifo_alloc( | 2007 | tcp_ctask->r2tqueue = kfifo_alloc( |
2009 | session->max_r2t * 4 * sizeof(void*), GFP_KERNEL, NULL); | 2008 | session->max_r2t * 4 * sizeof(void*), GFP_KERNEL, NULL); |
2010 | if (tcp_ctask->r2tqueue == ERR_PTR(-ENOMEM)) { | 2009 | if (tcp_ctask->r2tqueue == ERR_PTR(-ENOMEM)) { |
2011 | iscsi_pool_free(&tcp_ctask->r2tpool, | 2010 | iscsi_pool_free(&tcp_ctask->r2tpool); |
2012 | (void**)tcp_ctask->r2ts); | ||
2013 | goto r2t_alloc_fail; | 2011 | goto r2t_alloc_fail; |
2014 | } | 2012 | } |
2015 | } | 2013 | } |
@@ -2022,8 +2020,7 @@ r2t_alloc_fail: | |||
2022 | struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; | 2020 | struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; |
2023 | 2021 | ||
2024 | kfifo_free(tcp_ctask->r2tqueue); | 2022 | kfifo_free(tcp_ctask->r2tqueue); |
2025 | iscsi_pool_free(&tcp_ctask->r2tpool, | 2023 | iscsi_pool_free(&tcp_ctask->r2tpool); |
2026 | (void**)tcp_ctask->r2ts); | ||
2027 | } | 2024 | } |
2028 | return -ENOMEM; | 2025 | return -ENOMEM; |
2029 | } | 2026 | } |
@@ -2038,8 +2035,7 @@ iscsi_r2tpool_free(struct iscsi_session *session) | |||
2038 | struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; | 2035 | struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; |
2039 | 2036 | ||
2040 | kfifo_free(tcp_ctask->r2tqueue); | 2037 | kfifo_free(tcp_ctask->r2tqueue); |
2041 | iscsi_pool_free(&tcp_ctask->r2tpool, | 2038 | iscsi_pool_free(&tcp_ctask->r2tpool); |
2042 | (void**)tcp_ctask->r2ts); | ||
2043 | } | 2039 | } |
2044 | } | 2040 | } |
2045 | 2041 | ||