aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
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)
1503 data->ct.pool = pool; 1503 data->ct.pool = pool;
1504 } 1504 }
1505 } else { 1505 } else {
1506 data = kmalloc(sizeof(struct zfcp_gid_pn_data), GFP_ATOMIC); 1506 data = kmem_cache_alloc(zfcp_data.gid_pn_cache, GFP_ATOMIC);
1507 } 1507 }
1508 1508
1509 if (NULL == data) 1509 if (NULL == data)
@@ -1531,7 +1531,7 @@ static void zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn)
1531 if (gid_pn->ct.pool) 1531 if (gid_pn->ct.pool)
1532 mempool_free(gid_pn, gid_pn->ct.pool); 1532 mempool_free(gid_pn, gid_pn->ct.pool);
1533 else 1533 else
1534 kfree(gid_pn); 1534 kmem_cache_free(zfcp_data.gid_pn_cache, gid_pn);
1535} 1535}
1536 1536
1537/** 1537/**
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
640zfcp_qdio_sbals_from_scsicmnd(struct zfcp_fsf_req *fsf_req, 640zfcp_qdio_sbals_from_scsicmnd(struct zfcp_fsf_req *fsf_req,
641 unsigned long sbtype, struct scsi_cmnd *scsi_cmnd) 641 unsigned long sbtype, struct scsi_cmnd *scsi_cmnd)
642{ 642{
643 if (scsi_sg_count(scsi_cmnd)) 643 return zfcp_qdio_sbals_from_sg(fsf_req, sbtype, scsi_sglist(scsi_cmnd),
644 return zfcp_qdio_sbals_from_sg(fsf_req, sbtype, 644 scsi_sg_count(scsi_cmnd),
645 scsi_sglist(scsi_cmnd), 645 ZFCP_MAX_SBALS_PER_REQ);
646 scsi_sg_count(scsi_cmnd),
647 ZFCP_MAX_SBALS_PER_REQ);
648 else
649 return 0;
650} 646}
651 647
652/** 648/**
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)
764 return; 764 return;
765 765
766 ret = zfcp_fsf_exchange_port_data(NULL, adapter, data); 766 ret = zfcp_fsf_exchange_port_data(NULL, adapter, data);
767 if (ret == 0) { 767 if (ret) {
768 kfree(data);
769 } else {
768 adapter->stats_reset = jiffies/HZ; 770 adapter->stats_reset = jiffies/HZ;
769 old_data = adapter->stats_reset_data; 771 old_data = adapter->stats_reset_data;
770 adapter->stats_reset_data = data; /* finally freed in 772 adapter->stats_reset_data = data; /* finally freed in