vfs: no 'handle_io_response()' in regular VFS functions

Calling 'handle_io_response()' in a regular VFS function (in contrast to a
post-signal hook) can cause problems if the caller of the VFS function holds
a lock which prevents the io response handler from returning.

With this commit, the user of the VFS becomes responsible for unblocking
threads which might be blocking after a failed 'queue_read()', 'queue_sync()'
or 'write()' call.

Fixes #2896
This commit is contained in:
Christian Prochaska
2018-07-04 14:09:01 +02:00
committed by Christian Helmuth
parent b4dd9bc802
commit e3005266b6
6 changed files with 73 additions and 19 deletions

View File

@ -140,12 +140,6 @@ class Vfs::Fs_file_system : public File_system
source.release_packet(packet);
/*
* Notify anyone who might have failed on
* 'alloc_packet()' or 'submit_packet()'
*/
_io_handler.handle_io_response(nullptr);
return READ_OK;
}
@ -222,12 +216,6 @@ class Vfs::Fs_file_system : public File_system
source.release_packet(packet);
/*
* Notify anyone who might have failed on
* 'alloc_packet()' or 'submit_packet()'
*/
_io_handler.handle_io_response(nullptr);
return SYNC_OK;
}
};