mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
rbd: don't put snap_context twice in rbd_queue_workfn()
Commit 4e752f0ab0 ("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.
Cc: [email protected] # 3.18+
Signed-off-by: Ilya Dryomov <[email protected]>
Reviewed-by: Josh Durgin <[email protected]>
This commit is contained in:
parent
31ade3b83e
commit
70b16db86f
1 changed files with 1 additions and 0 deletions
|
|
@ -3442,6 +3442,7 @@ static void rbd_queue_workfn(struct work_struct *work)
|
|||
goto err_rq;
|
||||
}
|
||||
img_request->rq = rq;
|
||||
snapc = NULL; /* img_request consumes a ref */
|
||||
|
||||
if (op_type == OBJ_OP_DISCARD)
|
||||
result = rbd_img_request_fill(img_request, OBJ_REQUEST_NODATA,
|
||||
|
|
|
|||
Loading…
Reference in a new issue