diff options
author | David Young <dyoung@hdfgroup.org> | 2020-04-07 14:41:49 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-04-07 14:41:49 (GMT) |
commit | 1137ffef6ab8bbc33c48014fdc60e00eeee518b6 (patch) | |
tree | 6b85bf1c423e85efbb5ef66e246bd8d5bac6bca9 /src/H5PB.c | |
parent | 8d6c1eca16e792d70aa568db23db9198214f1178 (diff) | |
download | hdf5-1137ffef6ab8bbc33c48014fdc60e00eeee518b6.zip hdf5-1137ffef6ab8bbc33c48014fdc60e00eeee518b6.tar.gz hdf5-1137ffef6ab8bbc33c48014fdc60e00eeee518b6.tar.bz2 |
After adding a shadow page to the deferred free list, set the entry's
page number to 0 so that we cannot free it again by accident.
Diffstat (limited to 'src/H5PB.c')
-rw-r--r-- | src/H5PB.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1125,9 +1125,11 @@ shadow_idx_entry_remove(H5F_shared_t *shared, uint64_t page, bool only_mark) if (entry == NULL) return 0; - if (shared->vfd_swmr_writer && entry->md_file_page_offset != 0 && - shadow_image_defer_free(shared, entry) != 0) - return -1; + if (shared->vfd_swmr_writer && entry->md_file_page_offset != 0) { + if (shadow_image_defer_free(shared, entry) != 0) + return -1; + entry->md_file_page_offset = 0; + } if (only_mark) { entry->garbage = true; |