Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72183
b: refs/heads/master
c: 73fc4f0
h: refs/heads/master
i:
  72181: e8991e0
  72179: da3013c
  72175: 1c7ecb7
v: v3
  • Loading branch information
Jens Axboe committed Oct 23, 2007
1 parent 354661c commit 4e9a3e2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5edadbd0ae35d2daabaf6b44f2c58d67d4021ed2
refs/heads/master: 73fc4f0d2ce4a92c36b00649c58e0a068a6cdfa4
1 change: 1 addition & 0 deletions trunk/drivers/s390/scsi/zfcp_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ zfcp_sg_list_alloc(struct zfcp_sg_list *sg_list, size_t size)
retval = -ENOMEM;
goto out;
}
sg_init_table(sg_list->sg, sg_list->count);

for (i = 0, sg = sg_list->sg; i < sg_list->count; i++, sg++) {
sg->length = min(size, PAGE_SIZE);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
static inline void *
zfcp_sg_to_address(struct scatterlist *list)
{
return (void *) (page_address(list->page) + list->offset);
return sg_virt(list);
}

/**
Expand All @@ -74,7 +74,7 @@ zfcp_sg_to_address(struct scatterlist *list)
static inline void
zfcp_address_to_sg(void *address, struct scatterlist *list)
{
list->page = virt_to_page(address);
sg_set_page(list, virt_to_page(address));
list->offset = ((unsigned long) address) & (PAGE_SIZE - 1);
}

Expand Down
10 changes: 6 additions & 4 deletions trunk/drivers/s390/scsi/zfcp_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,15 @@ zfcp_erp_adisc(struct zfcp_port *port)
if (send_els == NULL)
goto nomem;

send_els->req = kzalloc(sizeof(struct scatterlist), GFP_ATOMIC);
send_els->req = kmalloc(sizeof(struct scatterlist), GFP_ATOMIC);
if (send_els->req == NULL)
goto nomem;
sg_init_table(send_els->req, 1);

send_els->resp = kzalloc(sizeof(struct scatterlist), GFP_ATOMIC);
send_els->resp = kmalloc(sizeof(struct scatterlist), GFP_ATOMIC);
if (send_els->resp == NULL)
goto nomem;
sg_init_table(send_els->resp, 1);

address = (void *) get_zeroed_page(GFP_ATOMIC);
if (address == NULL)
Expand Down Expand Up @@ -363,7 +365,7 @@ zfcp_erp_adisc(struct zfcp_port *port)
retval = -ENOMEM;
freemem:
if (address != NULL)
__free_pages(send_els->req->page, 0);
__free_pages(sg_page(send_els->req), 0);
if (send_els != NULL) {
kfree(send_els->req);
kfree(send_els->resp);
Expand Down Expand Up @@ -437,7 +439,7 @@ zfcp_erp_adisc_handler(unsigned long data)

out:
zfcp_port_put(port);
__free_pages(send_els->req->page, 0);
__free_pages(sg_page(send_els->req), 0);
kfree(send_els->req);
kfree(send_els->resp);
kfree(send_els);
Expand Down

0 comments on commit 4e9a3e2

Please sign in to comment.