summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-07-16 16:33:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-07-16 16:33:15 (GMT)
commit5e98b5bb36c9e0b1078e56d9b734657fcfe7a03d (patch)
tree1bf4e62685089c126e5143617ccde2ff87e923e3 /src/H5O.c
parent0daa76a15095d395a3901ca1b1b38dcbc60ebb23 (diff)
downloadhdf5-5e98b5bb36c9e0b1078e56d9b734657fcfe7a03d.zip
hdf5-5e98b5bb36c9e0b1078e56d9b734657fcfe7a03d.tar.gz
hdf5-5e98b5bb36c9e0b1078e56d9b734657fcfe7a03d.tar.bz2
[svn-r11077] Purpose:
Bug fix Description: Further progress on fixing file mounting to work properly. Platforms tested: FreeBSD 4.11 (sleipnir) Linux 2.4 Too minor to require h5committest
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/H5O.c b/src/H5O.c
index e341335..8dfd922 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -428,8 +428,24 @@ H5O_close(H5G_entry_t *obj_ent)
* pending then close the file and remove it from the H5I_FILE_CLOSING ID
* group.
*/
- if (obj_ent->file->mtab.nmounts==obj_ent->file->nopen_objs && obj_ent->file->closing)
- H5I_dec_ref(obj_ent->file->closing);
+ /* Check for just mount points holding file open */
+ if(obj_ent->file->mtab.nmounts == obj_ent->file->nopen_objs && obj_ent->file->closing) {
+ unsigned u; /* Local index variable */
+ hbool_t really_close; /* Whether to delay the file close by going to a "closing" state */
+
+ /* Check for open groups on mount points */
+ really_close = TRUE;
+ for(u = 0; u < obj_ent->file->mtab.nmounts; u++) {
+ if(H5G_get_shared_count(obj_ent->file->mtab.child[u].group) > 1) {
+ really_close = FALSE;
+ break;
+ } /* end if */
+ } /* end for */
+
+ /* If we really want to close this file now */
+ if(really_close)
+ H5I_dec_ref(obj_ent->file->closing);
+ } /* end if */
/* Free the ID to name buffers */
H5G_free_ent_name(obj_ent);