Skip to content

Commit

Permalink
rbd: fix image request leak on parent read
Browse files Browse the repository at this point in the history
When a read for a layered image object finds the target object
doesn't exist, a read image request for the parent image is created
and submitted.  When that completes, the callback routine was
not releasing that parent image request.  Fix that.

The slab allocation stuff just added has greatly simplified the
search for the source of this memory leak.

This resolves:
    http://tracker.ceph.com/issues/4803

Signed-off-by: Alex Elder <[email protected]>
Reviewed-by: Josh Durgin <[email protected]>
  • Loading branch information
Alex Elder committed May 2, 2013
1 parent 5522ae0 commit b5b09be
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2547,6 +2547,7 @@ static void rbd_img_parent_read_callback(struct rbd_img_request *img_request)
obj_request->xferred = img_request->xferred;
}
out:
rbd_img_request_put(img_request);
rbd_img_obj_request_read_callback(obj_request);
rbd_obj_request_complete(obj_request);
}
Expand Down

0 comments on commit b5b09be

Please sign in to comment.