lib/nfs/Connection: remove obsolete flag postponed_destroy

This commit is contained in:
Max Kellermann 2014-10-01 22:07:56 +02:00
parent aa7774b82b
commit 777360149d
2 changed files with 2 additions and 18 deletions

View File

@ -263,7 +263,6 @@ NfsConnection::OnSocketReady(unsigned flags)
assert(!in_service); assert(!in_service);
in_service = true; in_service = true;
postponed_destroy = false;
int result = nfs_service(context, events_to_libnfs(flags)); int result = nfs_service(context, events_to_libnfs(flags));
@ -271,14 +270,7 @@ NfsConnection::OnSocketReady(unsigned flags)
assert(in_service); assert(in_service);
in_service = false; in_service = false;
if (postponed_destroy) { if (!was_mounted && mount_finished) {
/* somebody has called nfs_client_free() while we were inside
nfs_service() */
const ScopeLock protect(mutex);
DestroyContext();
closed = true;
// TODO? nfs_client_cleanup_files(client);
} else if (!was_mounted && mount_finished) {
const ScopeLock protect(mutex); const ScopeLock protect(mutex);
if (postponed_mount_error.IsDefined()) { if (postponed_mount_error.IsDefined()) {

View File

@ -75,9 +75,7 @@ class NfsConnection : SocketMonitor, DeferredMonitor {
Error postponed_mount_error; Error postponed_mount_error;
/** /**
* True when nfs_service() is being called. During that, * True when nfs_service() is being called.
* nfs_client_free() is postponed, or libnfs will crash. See
* #postponed_destroy.
*/ */
bool in_service; bool in_service;
@ -87,12 +85,6 @@ class NfsConnection : SocketMonitor, DeferredMonitor {
*/ */
bool in_event; bool in_event;
/**
* True when nfs_client_free() has been called while #in_service
* was true.
*/
bool postponed_destroy;
bool mount_finished; bool mount_finished;
public: public: