rbd: fix leak of ops struct
The ops vector must be freed by the rbd_do_request caller. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
446cc6345d
commit
11f770027b
|
@ -996,6 +996,8 @@ static int rbd_do_op(struct request *rq,
|
||||||
ops,
|
ops,
|
||||||
num_reply,
|
num_reply,
|
||||||
rbd_req_cb, 0, NULL);
|
rbd_req_cb, 0, NULL);
|
||||||
|
|
||||||
|
rbd_destroy_ops(ops);
|
||||||
done:
|
done:
|
||||||
kfree(seg_name);
|
kfree(seg_name);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1063,7 +1065,9 @@ static int rbd_req_sync_notify_ack(struct rbd_device *dev,
|
||||||
{
|
{
|
||||||
struct ceph_osd_req_op *ops;
|
struct ceph_osd_req_op *ops;
|
||||||
struct page **pages = NULL;
|
struct page **pages = NULL;
|
||||||
int ret = rbd_create_rw_ops(&ops, 1, CEPH_OSD_OP_NOTIFY_ACK, 0);
|
int ret;
|
||||||
|
|
||||||
|
ret = rbd_create_rw_ops(&ops, 1, CEPH_OSD_OP_NOTIFY_ACK, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue