Commit c4df46c4 authored by Boaz Harrosh's avatar Boaz Harrosh Committed by James Bottomley

[SCSI] libosd: Free resources in reverse order of allocation

At osd_end_request first free the request that might
point to pages, then free these pages. In reverse order
of allocation. For now it's just anal neatness. When we'll
use mempools It'll also pay in performance.
Signed-off-by: default avatarBoaz Harrosh <>
Signed-off-by: default avatarJames Bottomley <>
parent ec6a0a41
......@@ -452,10 +452,6 @@ void osd_end_request(struct osd_request *or)
struct request *rq = or->request;
_osd_free_seg(or, &or->set_attr);
_osd_free_seg(or, &or->enc_get_attr);
_osd_free_seg(or, &or->get_attr);
if (rq) {
if (rq->next_rq) {
......@@ -464,6 +460,11 @@ void osd_end_request(struct osd_request *or)
_osd_free_seg(or, &or->get_attr);
_osd_free_seg(or, &or->enc_get_attr);
_osd_free_seg(or, &or->set_attr);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment