Skip to content

Commit

Permalink
libceph: clear r_req_lru_item in __unregister_linger_request()
Browse files Browse the repository at this point in the history
kick_requests() can put linger requests on the notarget list.  This
means we need to clear the much-overloaded req->r_req_lru_item in
__unregister_linger_request() as well, or we get an assertion failure
in ceph_osdc_release_request() - !list_empty(&req->r_req_lru_item).

AFAICT the assumption was that registered linger requests cannot be on
any of req->r_req_lru_item lists, but that's clearly not the case.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Alex Elder <elder@linaro.org>
  • Loading branch information
Ilya Dryomov committed Nov 13, 2014
1 parent a390de0 commit ba9d114
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,8 @@ static void __unregister_linger_request(struct ceph_osd_client *osdc,
if (list_empty(&req->r_osd_item))
req->r_osd = NULL;
}

list_del_init(&req->r_req_lru_item); /* can be on notarget */
ceph_osdc_put_request(req);
}

Expand Down

0 comments on commit ba9d114

Please sign in to comment.