From f0ac0c19b7cd5a6e202842f40350444d11bb3ac8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 13 May 2024 16:52:24 +0200 Subject: [PATCH] lib/nfs/Connection: remove obsolete debug field "in_destroy" This is obsolete because PrepareDestroyContext() no longer calls nfs_destroy_context(). --- src/lib/nfs/Connection.cxx | 11 ----------- src/lib/nfs/Connection.hxx | 5 ----- 2 files changed, 16 deletions(-) diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx index db23ec1fb..41feebc74 100644 --- a/src/lib/nfs/Connection.cxx +++ b/src/lib/nfs/Connection.cxx @@ -382,11 +382,6 @@ NfsConnection::PrepareDestroyContext() noexcept { assert(GetEventLoop().IsInside()); -#ifndef NDEBUG - assert(!in_destroy); - in_destroy = true; -#endif - if (mount_state == MountState::WAITING) { assert(mount_timeout_event.IsPending()); mount_timeout_event.Cancel(); @@ -403,11 +398,6 @@ NfsConnection::PrepareDestroyContext() noexcept callbacks.ForEach([](CancellableCallback &c){ c.PrepareDestroyContext(); }); - -#ifndef NDEBUG - assert(in_destroy); - in_destroy = false; -#endif } inline void @@ -552,7 +542,6 @@ NfsConnection::MountCallback(int status, [[maybe_unused]] nfs_context *nfs, mount_state = MountState::FINISHED; - assert(mount_timeout_event.IsPending() || in_destroy); mount_timeout_event.Cancel(); if (status < 0) { diff --git a/src/lib/nfs/Connection.hxx b/src/lib/nfs/Connection.hxx index de904c3a5..66579e772 100644 --- a/src/lib/nfs/Connection.hxx +++ b/src/lib/nfs/Connection.hxx @@ -118,11 +118,6 @@ class NfsConnection { * event updates are omitted. */ bool in_event = false; - - /** - * True when DestroyContext() is being called. - */ - bool in_destroy = false; #endif public: