summaryrefslogtreecommitdiff
path: root/net/ceph/messenger.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2020-11-11 14:08:59 +0100
committerIlya Dryomov <idryomov@gmail.com>2020-12-14 23:21:48 +0100
commita3da057bbdb769c01ab06626ace3de160d40e973 (patch)
treea499755ad82ff8058fad26421dc1fcff387eb696 /net/ceph/messenger.c
parent5963c3d01c8eec73d44a93fc0807b13369ffb63c (diff)
libceph: clear con->peer_global_seq on RESETSESSION
con->peer_global_seq is part of session state. Clear it when the server tells us to reset, not just in ceph_con_close(). Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph/messenger.c')
-rw-r--r--net/ceph/messenger.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index b1a936146855..1d4a51bf421c 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -659,11 +659,12 @@ static void ceph_con_reset_session(struct ceph_connection *con)
WARN_ON(con->out_msg);
ceph_msg_remove_list(&con->out_queue);
ceph_msg_remove_list(&con->out_sent);
-
- con->connect_seq = 0;
con->out_seq = 0;
con->in_seq = 0;
con->in_seq_acked = 0;
+
+ con->connect_seq = 0;
+ con->peer_global_seq = 0;
}
/*
@@ -682,7 +683,6 @@ void ceph_con_close(struct ceph_connection *con)
ceph_con_reset_protocol(con);
ceph_con_reset_session(con);
- con->peer_global_seq = 0;
cancel_con(con);
mutex_unlock(&con->mutex);
}