This commit introduced a bug:
    4634246d rbd: consolidate rbd_do_op() calls

When a read request is being issued, the snapshot context provided
isn't needed.  But that snap context pointer was acquired in
rbd_rq_fn() and it carries with it a reference to that structure.
So before discarding it, the reference needs to be dropped.

Signed-off-by: Alex Elder <[email protected]>
---
 drivers/block/rbd.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 835153e..b86f5e5 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1333,6 +1333,7 @@ static int rbd_do_op(struct request *rq,
        } else {
                opcode = CEPH_OSD_OP_READ;
                flags = CEPH_OSD_FLAG_READ;
+               ceph_put_snap_context(snapc);
                snapc = NULL;
                snapid = rbd_dev->spec->snap_id;
                payload_len = 0;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to