From: Olaf Kirch Date: Thu, 13 Dec 2007 18:43:25 +0000 (-0600) Subject: [SCSI] libiscsi, iscsi_tcp: iscsi pool cleanup X-Git-Tag: v2.6.25-rc1~1230^2~109 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6320377fd94316e58f75d0be6f6e7a644950a4ee;p=pandora-kernel.git [SCSI] libiscsi, iscsi_tcp: iscsi pool cleanup iscsi_pool_init simplified iscsi_pool_init currently has a lot of duplicate kfree() calls it does when some allocation fails. This patch simplifies the code a little by using iscsi_pool_free to tear down the pool in case of an error. iscsi_pool_init also returns a copy of the item array to the caller. Not all callers use this array, so we make it optional. Instead of allocating a second array and return that, allocate just one array, of twice the size. Update users of iscsi_pool_{init,free} This patch drops the (now useless) second argument to iscsi_pool_free, and updates all callers. It also removes the ctask->r2ts array, which was never used anyway. Since the items argument to iscsi_pool_init is now optional, we can pass NULL instead. Signed-off-by: Olaf Kirch Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- Reading git-diff-tree failed