Commit 282c1052 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov

ceph: fix kick_requests()

__do_request() may unregister the request. So we should update
iterator 'p' before calling __do_request()
Signed-off-by: default avatarYan, Zheng <zheng.z.yan@intel.com>
parent 06fee30f
...@@ -2067,11 +2067,12 @@ static void __wake_requests(struct ceph_mds_client *mdsc, ...@@ -2067,11 +2067,12 @@ static void __wake_requests(struct ceph_mds_client *mdsc,
static void kick_requests(struct ceph_mds_client *mdsc, int mds) static void kick_requests(struct ceph_mds_client *mdsc, int mds)
{ {
struct ceph_mds_request *req; struct ceph_mds_request *req;
struct rb_node *p; struct rb_node *p = rb_first(&mdsc->request_tree);
dout("kick_requests mds%d\n", mds); dout("kick_requests mds%d\n", mds);
for (p = rb_first(&mdsc->request_tree); p; p = rb_next(p)) { while (p) {
req = rb_entry(p, struct ceph_mds_request, r_node); req = rb_entry(p, struct ceph_mds_request, r_node);
p = rb_next(p);
if (req->r_got_unsafe) if (req->r_got_unsafe)
continue; continue;
if (req->r_session && if (req->r_session &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment