Skip to content

Commit d0bb883

Browse files
committed
libceph: fix misleading ceph_osdc_cancel_request() comment
cancel_request() never guaranteed that after its return the OSD client would be completely done with the OSD request. The callback (if specified) can still be invoked and a ref can still be held. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Xiubo Li <xiubli@redhat.com>
1 parent 75dbb68 commit d0bb883

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

net/ceph/osd_client.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4591,8 +4591,13 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc,
45914591
EXPORT_SYMBOL(ceph_osdc_start_request);
45924592

45934593
/*
4594-
* Unregister a registered request. The request is not completed:
4595-
* ->r_result isn't set and __complete_request() isn't called.
4594+
* Unregister request. If @req was registered, it isn't completed:
4595+
* r_result isn't set and __complete_request() isn't invoked.
4596+
*
4597+
* If @req wasn't registered, this call may have raced with
4598+
* handle_reply(), in which case r_result would already be set and
4599+
* __complete_request() would be getting invoked, possibly even
4600+
* concurrently with this call.
45964601
*/
45974602
void ceph_osdc_cancel_request(struct ceph_osd_request *req)
45984603
{

0 commit comments

Comments
 (0)