Message ID | 1383181847-7041-1-git-send-email-zheng.z.yan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Applied this to the testing branch. Thanks! sage On Thu, 31 Oct 2013, Yan, Zheng wrote: > From: "Yan, Zheng" <zheng.z.yan@intel.com> > > We also need to wake up 'safe' waiters if error occurs or request > aborted. Otherwise sync(2)/fsync(2) may hang forever. > > Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> > --- > fs/ceph/mds_client.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c > index 8ef7926..cb6a7ae 100644 > --- a/fs/ceph/mds_client.c > +++ b/fs/ceph/mds_client.c > @@ -643,6 +643,8 @@ static void __unregister_request(struct ceph_mds_client *mdsc, > iput(req->r_unsafe_dir); > req->r_unsafe_dir = NULL; > } > + > + complete_all(&req->r_safe_completion); > > ceph_mdsc_put_request(req); > } > @@ -2186,7 +2188,6 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg) > if (head->safe) { > req->r_got_safe = true; > __unregister_request(mdsc, req); > - complete_all(&req->r_safe_completion); > > if (req->r_got_unsafe) { > /* > -- > 1.8.1.4 > > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 8ef7926..cb6a7ae 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -643,6 +643,8 @@ static void __unregister_request(struct ceph_mds_client *mdsc, iput(req->r_unsafe_dir); req->r_unsafe_dir = NULL; } + + complete_all(&req->r_safe_completion); ceph_mdsc_put_request(req); } @@ -2186,7 +2188,6 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg) if (head->safe) { req->r_got_safe = true; __unregister_request(mdsc, req); - complete_all(&req->r_safe_completion); if (req->r_got_unsafe) { /*