# HG changeset patch # User Paul Boddie # Date 1656340236 -7200 # Node ID a6752a91fd633883254a7394affe9c585fb40a9c # Parent 7b7a35cc68e6787675c36dac4eb51fc6ba376080 Make sure that the accessor is closed when a provider is closed, thus flushing and closing the underlying file and making sure that written data is committed to the filesystem. diff -r 7b7a35cc68e6 -r a6752a91fd63 libfsserver/lib/files/file_provider.cc --- a/libfsserver/lib/files/file_provider.cc Sun Jun 26 23:44:34 2022 +0200 +++ b/libfsserver/lib/files/file_provider.cc Mon Jun 27 16:30:36 2022 +0200 @@ -37,11 +37,12 @@ FileProvider::~FileProvider() { /* Accessors are allocated exclusively for page mappers for files, and - so can be deleted here. In general, the page mapper may not have - exclusive ownership of an accessor. */ + so can be deleted here. */ Accessor *accessor = _mapper->accessor(); delete _mapper; + + accessor->close(); delete accessor; }