From: Jeff Layton Date: Fri, 20 Mar 2020 21:07:36 +0000 (-0400) Subject: ceph: throw a warning if we destroy session with mutex still locked X-Git-Tag: v5.8-rc1~88^2~17 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=88828190f0073bd8f9aa5e2b1caf753d289c6d49;p=linux-2.6-block.git ceph: throw a warning if we destroy session with mutex still locked Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 20fab5c72d39..de6bb8829837 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -659,6 +659,7 @@ void ceph_put_mds_session(struct ceph_mds_session *s) if (refcount_dec_and_test(&s->s_ref)) { if (s->s_auth.authorizer) ceph_auth_destroy_authorizer(s->s_auth.authorizer); + WARN_ON(mutex_is_locked(&s->s_mutex)); xa_destroy(&s->s_delegated_inos); kfree(s); }