From: Sage Weil Date: Sun, 21 Mar 2010 03:50:58 +0000 (-0700) Subject: ceph: fix session check on mds reply X-Git-Tag: firefly_0821_release~9833^2~2459^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d96d60498ff748c5a88c72ec5d1cc4ba9a583e7e;p=firefly-linux-kernel-4.4.55.git ceph: fix session check on mds reply Fix a broken check that a reply came back from the same MDS we sent the request to. I don't think a case that actually triggers this would ever come up in practice, but it's clearly wrong and easy to fix. Reported-by: Dan Carpenter Signed-off-by: Sage Weil --- diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index ad0fbc3128d3..5268d404963c 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1778,7 +1778,7 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg) dout("handle_reply %p\n", req); /* correct session? */ - if (!req->r_session && req->r_session != session) { + if (req->r_session != session) { pr_err("mdsc_handle_reply got %llu on session mds%d" " not mds%d\n", tid, session->s_mds, req->r_session ? req->r_session->s_mds : -1);