]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rbd: don't put snap_context twice in rbd_queue_workfn()
authorIlya Dryomov <idryomov@gmail.com>
Fri, 27 Nov 2015 18:23:24 +0000 (19:23 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 5 Feb 2016 03:33:19 +0000 (19:33 -0800)
commitb553f83d970dc360d7382425c43844cdf4c4f55e
tree80e4338d63076d4b9d54ec45f62f5a7f39654c72
parent38525bb437cc6d3ba43056cfd2c8c91637092866
rbd: don't put snap_context twice in rbd_queue_workfn()

Orabug: 22623867

commit 70b16db86f564977df074072143284aec2cb1162 upstream.

Commit 4e752f0ab0e8 ("rbd: access snapshot context and mapping size
safely") moved ceph_get_snap_context() out of rbd_img_request_create()
and into rbd_queue_workfn(), adding a ceph_put_snap_context() to the
error path in rbd_queue_workfn().  However, rbd_img_request_create()
consumes a ref on snapc, so calling ceph_put_snap_context() after
a successful rbd_img_request_create() leads to an extra put.  Fix it.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 0330982c45ec56b0855c9288bf07d5c5edb12faf)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/block/rbd.c