# HG changeset patch # User Paul Boddie # Date 1679791013 -3600 # Node ID 6e89c2c7fb49f65dbb790c626fa8ebc8fef65067 # Parent 63966fe83b5bea4e99230310ef7ae8274f33c657 Restored the intuitive ordering of unsubscribing and closing. diff -r 63966fe83b5b -r 6e89c2c7fb49 libfsclient/lib/src/file.cc --- a/libfsclient/lib/src/file.cc Sun Mar 26 01:04:44 2023 +0100 +++ b/libfsclient/lib/src/file.cc Sun Mar 26 01:36:53 2023 +0100 @@ -107,12 +107,8 @@ { if (l4_is_valid_cap(file->ref)) { + notifier_get_task_notifier()->unsubscribe(file_notifiable(file)); ipc_cap_free_um(file->ref); - - /* Only unsubscribe after actually closing the file and sending any - notifications. */ - - notifier_get_task_notifier()->unsubscribe(file_notifiable(file)); } if (file->memory != NULL)