ceph: throw a warning if we destroy session with mutex still locked
authorJeff Layton <jlayton@kernel.org>
Fri, 20 Mar 2020 21:07:36 +0000 (17:07 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 1 Jun 2020 11:22:52 +0000 (13:22 +0200)
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c

index 20fab5c72d39a3eb25be7917e865d0747c47a7ca..de6bb88298372adb3f332de61c191a361f23f438 100644 (file)
@@ -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);
        }