summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-01-26 16:05:37 +0100
committerIlya Dryomov <idryomov@gmail.com>2016-02-04 18:25:15 +0100
commitdb6aed70235b35a113e1b0e81cb293fd2e92de0f (patch)
tree793ec9f26263f9fa318627208f436daf53d90ee4
parentceph: checking for IS_ERR instead of NULL (diff)
downloadlinux-db6aed70235b35a113e1b0e81cb293fd2e92de0f.tar.xz
linux-db6aed70235b35a113e1b0e81cb293fd2e92de0f.zip
ceph: fix snap context leak in error path
Signed-off-by: Yan, Zheng <zyan@redhat.com>
-rw-r--r--fs/ceph/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 7c85ddef68ab..eb9028e8cfc5 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -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,
snapc, CEPH_NOSNAP, &aio_req->mtime);
- ceph_put_snap_context(snapc);
ceph_osdc_put_request(orig_req);
req->r_callback = ceph_aio_complete_req;
@@ -731,6 +730,7 @@ out:
ceph_aio_complete_req(req, NULL);
}
+ ceph_put_snap_context(snapc);
kfree(aio_work);
}