summaryrefslogtreecommitdiffstats
path: root/src/H5Dlayout.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dlayout.c')
-rw-r--r--src/H5Dlayout.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index ae73ca5..d0e9d07 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -273,7 +273,6 @@ H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
} /* end if */
/* Store EFL file name offset */
- HDassert(0 == efl->slot[u].name_offset);
efl->slot[u].name_offset = offset;
} /* end for */
@@ -295,12 +294,11 @@ H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
done:
/* Error cleanup */
- if(ret_value < 0) {
- if(dset->shared->layout.type == H5D_CHUNKED && layout_init) {
- if(H5D__chunk_dest(file, dxpl_id, dset) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy chunk cache")
- } /* end if */
- } /* end if */
+ if(ret_value < 0)
+ if(layout_init)
+ /* Destroy any cached layout information for the dataset */
+ if(dset->shared->layout.ops->dest && (dset->shared->layout.ops->dest)(dset, dxpl_id) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy layout info")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5D__layout_oh_create() */