Commit db6aed70 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov

ceph: fix snap context leak in error path

Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
parent 1418bf07
...@@ -716,7 +716,6 @@ static void ceph_aio_retry_work(struct work_struct *work) ...@@ -716,7 +716,6 @@ static void ceph_aio_retry_work(struct work_struct *work)
ceph_osdc_build_request(req, req->r_ops[0].extent.offset, ceph_osdc_build_request(req, req->r_ops[0].extent.offset,
snapc, CEPH_NOSNAP, &aio_req->mtime); snapc, CEPH_NOSNAP, &aio_req->mtime);
ceph_put_snap_context(snapc);
ceph_osdc_put_request(orig_req); ceph_osdc_put_request(orig_req);
req->r_callback = ceph_aio_complete_req; req->r_callback = ceph_aio_complete_req;
...@@ -731,6 +730,7 @@ static void ceph_aio_retry_work(struct work_struct *work) ...@@ -731,6 +730,7 @@ static void ceph_aio_retry_work(struct work_struct *work)
ceph_aio_complete_req(req, NULL); ceph_aio_complete_req(req, NULL);
} }
ceph_put_snap_context(snapc);
kfree(aio_work); kfree(aio_work);
} }
......
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