summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMuqun Yang <myang6@hdfgroup.org>2021-10-18 23:20:56 (GMT)
committerMuqun Yang <myang6@hdfgroup.org>2021-10-18 23:20:56 (GMT)
commit25bcb8e953772b21e46426655fb6a6f0f7edc1f5 (patch)
tree9668ed61741c4749234bf7ea5eadb97ad5cd1399 /src
parent5d9248aab77f06f8b1943374ba4ba24a322ad31d (diff)
downloadhdf5-25bcb8e953772b21e46426655fb6a6f0f7edc1f5.zip
hdf5-25bcb8e953772b21e46426655fb6a6f0f7edc1f5.tar.gz
hdf5-25bcb8e953772b21e46426655fb6a6f0f7edc1f5.tar.bz2
Revise the H5Fopen log test.
Diffstat (limited to 'src')
-rw-r--r--src/H5Fint.c6
-rw-r--r--src/H5Fvfd_swmr.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index a50c38c..9c4a143 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -2225,6 +2225,9 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
ret_value = file;
done:
+#if 1 /*KENT*/
+ H5F_post_vfd_swrm_log_entry(file, 0, "File open ends");
+#endif
if ((NULL == ret_value) && file) {
if (file->shared->root_grp && file->shared->nrefs == 1) {
if (H5AC_expunge_tag_type_metadata(file, H5G_oloc(file->shared->root_grp)->addr, H5AC_OHDR_ID,
@@ -2235,9 +2238,6 @@ done:
if (H5F__dest(file, FALSE) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "problems closing file")
}
-#if 1 /*KENT*/
- H5F_post_vfd_swrm_log_entry(file, 0, "File open ends");
-#endif
if (vfd_swmr_config_ptr)
H5MM_free(vfd_swmr_config_ptr);
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c
index c938014..77f5019 100644
--- a/src/H5Fvfd_swmr.c
+++ b/src/H5Fvfd_swmr.c
@@ -1923,6 +1923,8 @@ H5F_post_vfd_swrm_log_entry(H5F_t *f, int entry_type_code, char *body)
FUNC_ENTER_NOAPI(FAIL)
if (f==NULL)
HGOTO_DONE(TRUE)
+ else if(f->shared==NULL)
+ HGOTO_DONE(TRUE)
if (f->shared->vfd_swmr_log_on == false)
HGOTO_DONE(TRUE)
if (HDclock_gettime(CLOCK_MONOTONIC, &current_time) < 0)