summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-08-15 14:45:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-08-15 14:45:02 (GMT)
commitda1e2ca0893d82ae3faa42acebae48b428185d02 (patch)
tree36c68d4abedf388765f7cea36e758291ab18cd85 /src/H5AC.c
parent7f4843c06bfdf62da93f4e7a68fda17a3b3e3070 (diff)
downloadhdf5-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.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index c6f1f43..cb3aa79 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -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 */