Message ID | 509DC4B8.5020306@inktank.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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;
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> --- drivers/block/rbd.c | 1 + 1 file changed, 1 insertion(+)