Commit df963ea8 authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov

ceph: remove req from unsafe list when unregistering it

There's no reason a request should ever be on a s_unsafe list but not
in the request tree.

Link: default avatarJeff Layton <>
Reviewed-by: default avatarYan, Zheng <>
Signed-off-by: default avatarIlya Dryomov <>
parent b9942bc9
......@@ -628,6 +628,9 @@ static void __unregister_request(struct ceph_mds_client *mdsc,
dout("__unregister_request %p tid %lld\n", req, req->r_tid);
/* Never leave an unregistered request on an unsafe list! */
if (req->r_tid == mdsc->oldest_tid) {
struct rb_node *p = rb_next(&req->r_node);
mdsc->oldest_tid = 0;
......@@ -1058,7 +1061,6 @@ static void cleanup_session_requests(struct ceph_mds_client *mdsc,
while (!list_empty(&session->s_unsafe)) {
req = list_first_entry(&session->s_unsafe,
struct ceph_mds_request, r_unsafe_item);
pr_warn_ratelimited(" dropping unsafe request %llu\n",
__unregister_request(mdsc, req);
......@@ -2469,7 +2471,6 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
* useful we could do with a revised return value.
dout("got safe reply %llu, mds%d\n", tid, mds);
/* last unsafe request during umount? */
if (mdsc->stopping && !__get_oldest_req(mdsc))
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment