summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r--src/H5Dint.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 9c077c9..ee0f49f 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1635,7 +1635,8 @@ herr_t
H5D_close(H5D_t *dataset)
{
unsigned free_failed = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t corked; /* Whether the dataset is corked or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1706,6 +1707,14 @@ H5D_close(H5D_t *dataset)
#endif /* NDEBUG */
} /* end switch */ /*lint !e788 All appropriate cases are covered */
+ /* Uncork cache entries with object address tag */
+ if(H5AC_cork(dataset->oloc.file, dataset->oloc.addr, H5AC__GET_CORKED, &corked) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_SYSTEM, FAIL, "unable to retrieve an object's cork status")
+ else if(corked) {
+ if(H5AC_cork(dataset->oloc.file, dataset->oloc.addr, H5AC__UNCORK, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_SYSTEM, FAIL, "unable to uncork an object")
+ }
+
/* If the dataset is opened for SWMR access, shut that down */
if(dataset->shared->is_swimming)
if(H5D__swmr_teardown(dataset, H5AC_dxpl_id) < 0)