Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190807
b: refs/heads/master
c: 9abf82b
h: refs/heads/master
i:
  190805: 786c22f
  190803: 2447dc5
  190799: 8be4469
v: v3
  • Loading branch information
Sage Weil committed May 11, 2010
1 parent 1327ded commit d697490
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d85b705663905b3dae30007f824355bdcfcf3f00
refs/heads/master: 9abf82b8bc93dd904738a71ca69aa5df356d4d24
29 changes: 16 additions & 13 deletions trunk/fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2136,7 +2136,7 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc, int mds)
struct ceph_mds_session *session = NULL;
struct ceph_msg *reply;
struct rb_node *p;
int err;
int err = -ENOMEM;
struct ceph_pagelist *pagelist;

pr_info("reconnect to recovering mds%d\n", mds);
Expand Down Expand Up @@ -2185,7 +2185,7 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc, int mds)
goto fail;
err = iterate_session_caps(session, encode_caps_cb, pagelist);
if (err < 0)
goto out;
goto fail;

/*
* snaprealms. we provide mds with the ino, seq (version), and
Expand Down Expand Up @@ -2213,28 +2213,31 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc, int mds)
reply->nr_pages = calc_pages_for(0, pagelist->length);
ceph_con_send(&session->s_con, reply);

if (session) {
session->s_state = CEPH_MDS_SESSION_OPEN;
__wake_requests(mdsc, &session->s_waiting);
}
session->s_state = CEPH_MDS_SESSION_OPEN;
mutex_unlock(&session->s_mutex);

mutex_lock(&mdsc->mutex);
__wake_requests(mdsc, &session->s_waiting);
mutex_unlock(&mdsc->mutex);

ceph_put_mds_session(session);

out:
up_read(&mdsc->snap_rwsem);
if (session) {
mutex_unlock(&session->s_mutex);
ceph_put_mds_session(session);
}
mutex_lock(&mdsc->mutex);
return;

fail:
ceph_msg_put(reply);
up_read(&mdsc->snap_rwsem);
mutex_unlock(&session->s_mutex);
ceph_put_mds_session(session);
fail_nomsg:
ceph_pagelist_release(pagelist);
kfree(pagelist);
fail_nopagelist:
pr_err("ENOMEM preparing reconnect for mds%d\n", mds);
goto out;
pr_err("error %d preparing reconnect for mds%d\n", err, mds);
mutex_lock(&mdsc->mutex);
return;
}


Expand Down

0 comments on commit d697490

Please sign in to comment.