diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-08-15 14:45:02 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-08-15 14:45:02 (GMT) |
commit | da1e2ca0893d82ae3faa42acebae48b428185d02 (patch) | |
tree | 36c68d4abedf388765f7cea36e758291ab18cd85 /src/H5AC.c | |
parent | 7f4843c06bfdf62da93f4e7a68fda17a3b3e3070 (diff) | |
download | hdf5-da1e2ca0893d82ae3faa42acebae48b428185d02.zip hdf5-da1e2ca0893d82ae3faa42acebae48b428185d02.tar.gz hdf5-da1e2ca0893d82ae3faa42acebae48b428185d02.tar.bz2 |
[svn-r7369] Purpose:
Bug fix
Description:
The metadata cache 'destroy' callback routines need the file handle in
order for certain callback routines (currently just the H5HG one) to perform
extra cleanups. The recent change to call the 'destroy' callback from the
'clear' callback omitted this parameter.
Solution:
Add the file handle to the metadata cache 'clear' callbacks.
Platforms tested:
FreeBSD 4.8 (sleipnir)
too small to need h5committest
Diffstat (limited to 'src/H5AC.c')
-rw-r--r-- | src/H5AC.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -879,7 +879,7 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, unsi /* Clear the dirty flag only, if requested */ if(clear_only) { /* Call the callback routine to clear all dirty flags for object */ - if(((*info)->type->clear)(*info, destroy)<0) + if(((*info)->type->clear)(f, *info, destroy)<0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to clear cache"); } /* end if */ else { @@ -982,7 +982,7 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, unsi /* Clear the dirty flag only, if requested */ if(clear_only) { /* Call the callback routine to clear all dirty flags for object */ - if(((*info)->type->clear)(*info, destroy)<0) + if(((*info)->type->clear)(f, *info, destroy)<0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to clear cache"); } /* end if */ else { @@ -1770,12 +1770,8 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, (*info)->addr = addr; } /* end if */ else { - /* Mark the thing as clean (prerequite for destroy routine) */ - if((type->clear)(thing, FALSE)<0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to clear object"); - /* Destroy previously cached thing */ - if ((type->dest)(f, thing)<0) + if ((type->clear)(f, thing, TRUE)<0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to free object") } /* end else */ |