diff options
author | mainzer <mainzer#hdfgroup.org> | 2020-08-13 16:31:16 (GMT) |
---|---|---|
committer | mainzer <mainzer#hdfgroup.org> | 2020-08-13 16:31:16 (GMT) |
commit | 32024169364ddf031df8da879c45c3647a4d6135 (patch) | |
tree | 1dc1fa889c8ddba83b9794734e7d7e67b8fe7ab6 /src/H5FDsplitter.c | |
parent | 33f35183cbfdde70ee8f803acb5b735ad4dfe086 (diff) | |
parent | e291fd31fd480dc4900d056e0e08df002e85a3f2 (diff) | |
download | hdf5-32024169364ddf031df8da879c45c3647a4d6135.zip hdf5-32024169364ddf031df8da879c45c3647a4d6135.tar.gz hdf5-32024169364ddf031df8da879c45c3647a4d6135.tar.bz2 |
Merge branch 'develop' into mdc_sl_opt
Diffstat (limited to 'src/H5FDsplitter.c')
-rw-r--r-- | src/H5FDsplitter.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 4ed3c4a..eb30b1f 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -1221,16 +1221,12 @@ H5FD_splitter_lock(H5FD_t *_file, hbool_t rw) HDassert(file->rw_file); /* Place the lock on each file */ - if (H5FD_lock(file->rw_file, rw) < 0) { - HGOTO_ERROR(H5E_VFL, H5E_CANTLOCK, FAIL, "unable to lock R/W file") - } - if (file->wo_file != NULL) { - if (H5FD_lock(file->wo_file, rw) < 0) { - H5FD_SPLITTER_WO_ERROR(file, "H5FD_splitter_lock", - H5E_VFL, H5E_CANTLOCK, FAIL, - "unable to lock W/O file") - } - } + if (H5FD_lock(file->rw_file, rw) < 0) + HGOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock R/W file") + + if (file->wo_file != NULL) + if (H5FD_lock(file->wo_file, rw) < 0) + H5FD_SPLITTER_WO_ERROR(file, "H5FD_splitter_lock", H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock W/O file") done: FUNC_LEAVE_NOAPI(ret_value) @@ -1260,15 +1256,12 @@ H5FD_splitter_unlock(H5FD_t *_file) HDassert(file->rw_file); /* Remove the lock on each file */ - if (H5FD_unlock(file->rw_file) < 0) { - HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCK, FAIL, "unable to unlock R/W file") - } - if (file->wo_file != NULL) { - if (H5FD_unlock(file->wo_file) < 0) { - HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCK, FAIL, - "unable to unlock W/O file") - } - } + if (H5FD_unlock(file->rw_file) < 0) + HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock R/W file") + + if (file->wo_file != NULL) + if (H5FD_unlock(file->wo_file) < 0) + HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock W/O file") done: FUNC_LEAVE_NOAPI(ret_value) |