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 <elder@inktank.com>
} 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;