ceph: don't WARN if we're still opening a session to an MDS
authorLuis Henriques <lhenriques@suse.de>
Thu, 15 Jul 2021 13:40:39 +0000 (14:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jul 2021 12:37:31 +0000 (14:37 +0200)
commita706c12da916ef6fd7b31664d1caffe0b1d4a1d3
tree940bda16803cb1e9b8678d783f7252e6a95529e0
parent115784bcccf135c3a3548098153413d76f16aae0
ceph: don't WARN if we're still opening a session to an MDS

[ Upstream commit cdb330f4b41ab55feb35487729e883c9e08b8a54 ]

If MDSs aren't available while mounting a filesystem, the session state
will transition from SESSION_OPENING to SESSION_CLOSING.  And in that
scenario check_session_state() will be called from delayed_work() and
trigger this WARN.

Avoid this by only WARNing after a session has already been established
(i.e., the s_ttl will be different from 0).

Fixes: 62575e270f66 ("ceph: check session state after bumping session->s_seq")
Signed-off-by: Luis Henriques <lhenriques@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ceph/mds_client.c