diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-02-18 15:02:17 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-02-18 15:02:17 (GMT) |
commit | 95223419fbb4232ba0b2cc42b3f7210db9ae4915 (patch) | |
tree | caba948964b8e9c6986cf95fa6faec4dbdc62497 /src/H5F.c | |
parent | 0fb3254237255e8d145be86931c38ef77de02f78 (diff) | |
download | hdf5-95223419fbb4232ba0b2cc42b3f7210db9ae4915.zip hdf5-95223419fbb4232ba0b2cc42b3f7210db9ae4915.tar.gz hdf5-95223419fbb4232ba0b2cc42b3f7210db9ae4915.tar.bz2 |
[svn-r18272] Description:
Bring r18271 from trunk to 1.8 branch:
Clean up the file closing behavior a little more.
Tested on:
Mac OS X/32 10.6.2 (amazon) w/debug & production
(too minor to require h5committest)
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 19 |
1 files changed, 4 insertions, 15 deletions
@@ -974,17 +974,8 @@ H5F_dest(H5F_t *f, hid_t dxpl_id) HDassert(f->shared); if(1 == f->shared->nrefs) { - /* Flush at this point since the file will be closed */ - /* (Only try to flush here if the file structure was successfully - * initialized (i.e., the file struct is being shutdown in an - * orderly manner with the 'closing' flag set) - */ - if(f->closing) { -#if H5AC_DUMP_STATS_ON_CLOSE - /* Dump debugging info */ - H5AC_stats(f); -#endif /* H5AC_DUMP_STATS_ON_CLOSE */ - + /* Release objects that depend on the superblock being initialized */ + if(f->shared->sblock) { /* Shutdown file free space manager(s) */ /* (We should release the free space information now (before truncating * the file and before the metadata cache is shut down) since the @@ -995,15 +986,13 @@ H5F_dest(H5F_t *f, hid_t dxpl_id) if(H5MF_close(f, dxpl_id) < 0) /* Push error, but keep going*/ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release file free space info") - } /* end if */ - /* Unpin the superblock, since we're about to destroy the cache */ - if(f->shared->sblock) { + /* Unpin the superblock, since we're about to destroy the cache */ if(H5AC_unpin_entry(f->shared->sblock) < 0) /* Push error, but keep going*/ HDONE_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin superblock") f->shared->sblock = NULL; - } + } /* end if */ /* Remove shared file struct from list of open files */ if(H5F_sfile_remove(f->shared) < 0) |