diff options
author | Quincey Koziol <koziol@lbl.gov> | 2018-12-18 16:44:32 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@lbl.gov> | 2018-12-18 16:44:32 (GMT) |
commit | f0c83dedb64082dcbce3012e99fcb77dc1d96d1b (patch) | |
tree | 897cbf15d1c3093345d3d266e58e9f3ef36a542b /src/H5Fint.c | |
parent | aadebc1b7eefa1ef0954b30f109f288f79452998 (diff) | |
parent | 2b496c1e19c19847bd6ab9b692b13db3d3afb0a9 (diff) | |
download | hdf5-f0c83dedb64082dcbce3012e99fcb77dc1d96d1b.zip hdf5-f0c83dedb64082dcbce3012e99fcb77dc1d96d1b.tar.gz hdf5-f0c83dedb64082dcbce3012e99fcb77dc1d96d1b.tar.bz2 |
Merge pull request #1391 in HDFFV/hdf5 from stackable_vol_fix_07 to develop
* commit '2b496c1e19c19847bd6ab9b692b13db3d3afb0a9':
Correct error from refactoring out H5VL_FILE_CACHE_VOL_CONN callback.
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r-- | src/H5Fint.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c index bc3b8bf..b212657 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -127,28 +127,25 @@ H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info) /* Sanity check */ HDassert(file); - /* Only cache VOL connector ID & info the first time the file is opened */ - if(file->shared->nrefs == 1) { - /* Copy connector info, if it exists */ - if(vol_info) { - H5VL_class_t *connector; /* Pointer to connector */ + /* Copy connector info, if it exists */ + if(vol_info) { + H5VL_class_t *connector; /* Pointer to connector */ - /* Retrieve the connector for the ID */ - if(NULL == (connector = (H5VL_class_t *)H5I_object(vol_id))) - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a VOL connector ID") - - /* Allocate and copy connector info */ - if(H5VL_copy_connector_info(connector, &new_connector_info, vol_info) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "connector info copy failed") - } /* end if */ + /* Retrieve the connector for the ID */ + if(NULL == (connector = (H5VL_class_t *)H5I_object(vol_id))) + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a VOL connector ID") - /* Cache the connector ID & info for the container */ - file->shared->vol_id = vol_id; - file->shared->vol_info = new_connector_info; - if(H5I_inc_ref(file->shared->vol_id, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed") + /* Allocate and copy connector info */ + if(H5VL_copy_connector_info(connector, &new_connector_info, vol_info) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "connector info copy failed") } /* end if */ + /* Cache the connector ID & info for the container */ + file->shared->vol_id = vol_id; + file->shared->vol_info = new_connector_info; + if(H5I_inc_ref(file->shared->vol_id, FALSE) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed") + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__set_vol_conn() */ |