summaryrefslogtreecommitdiff
path: root/drivers/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-11 07:46:09 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-11 07:46:09 -0700
commitcabe456902e709095ebf1481342ea89910887d60 (patch)
treec906ff1a07786fa09d203acbc7b9023a981be121 /drivers/s390
parent0d4cbb5e7f60b2f1a4d8b7f6ea4cc264262c7a01 (diff)
parent6724add1b5cfb020ba8f5532efe430d1ccd5fc30 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] libiscsi: sync up iscsi and scsi eh's access to the connection [SCSI] libiscsi: fix null ptr regression when aborting a command with data to transfer [SCSI] qla2xxx: Update version number to 8.02.00-k3. [SCSI] qla2xxx: Correct mailbox register dump for FWI2 capable ISPs. [SCSI] qla2xxx: Correct 8GB iIDMA support. [SCSI] qla2xxx: Correct management-server login-state synchronization issue. [SCSI] qla2xxx: Don't modify parity bits during ISP25XX restart. [SCSI] qla2xxx: Allocate enough space for the full PCI descriptor. [SCSI] zfcp: fix the data buffer accessor patch [SCSI] zfcp: allocate gid_pn_data objects from gid_pn_cache [SCSI] zfcp: fix memory leak
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_aux.c4
-rw-r--r--drivers/s390/scsi/zfcp_qdio.c10
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c4
3 files changed, 8 insertions, 10 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index ab5ec1feaf4e..90aa53fc4f3e 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -1503,7 +1503,7 @@ zfcp_gid_pn_buffers_alloc(struct zfcp_gid_pn_data **gid_pn, mempool_t *pool)
data->ct.pool = pool;
}
} else {
- data = kmalloc(sizeof(struct zfcp_gid_pn_data), GFP_ATOMIC);
+ data = kmem_cache_alloc(zfcp_data.gid_pn_cache, GFP_ATOMIC);
}
if (NULL == data)
@@ -1531,7 +1531,7 @@ static void zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn)
if (gid_pn->ct.pool)
mempool_free(gid_pn, gid_pn->ct.pool);
else
- kfree(gid_pn);
+ kmem_cache_free(zfcp_data.gid_pn_cache, gid_pn);
}
/**
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index 81daa8204bfe..c6899efdc8f6 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -640,13 +640,9 @@ int
zfcp_qdio_sbals_from_scsicmnd(struct zfcp_fsf_req *fsf_req,
unsigned long sbtype, struct scsi_cmnd *scsi_cmnd)
{
- if (scsi_sg_count(scsi_cmnd))
- return zfcp_qdio_sbals_from_sg(fsf_req, sbtype,
- scsi_sglist(scsi_cmnd),
- scsi_sg_count(scsi_cmnd),
- ZFCP_MAX_SBALS_PER_REQ);
- else
- return 0;
+ return zfcp_qdio_sbals_from_sg(fsf_req, sbtype, scsi_sglist(scsi_cmnd),
+ scsi_sg_count(scsi_cmnd),
+ ZFCP_MAX_SBALS_PER_REQ);
}
/**
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 0acf6db0a08d..ad7eb4a9261c 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -764,7 +764,9 @@ zfcp_reset_fc_host_stats(struct Scsi_Host *shost)
return;
ret = zfcp_fsf_exchange_port_data(NULL, adapter, data);
- if (ret == 0) {
+ if (ret) {
+ kfree(data);
+ } else {
adapter->stats_reset = jiffies/HZ;
old_data = adapter->stats_reset_data;
adapter->stats_reset_data = data; /* finally freed in