diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-06-02 21:17:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-06-02 21:17:26 (GMT) |
commit | b941208aa1dab642491d9b856e8e1d4912273ffc (patch) | |
tree | e74c72bb0c8be7b0106801692df3fc5a76ebf157 /src/H5O.c | |
parent | bae373c32236ad99425154f5fcec4cb185e583d0 (diff) | |
download | hdf5-b941208aa1dab642491d9b856e8e1d4912273ffc.zip hdf5-b941208aa1dab642491d9b856e8e1d4912273ffc.tar.gz hdf5-b941208aa1dab642491d9b856e8e1d4912273ffc.tar.bz2 |
[svn-r16998] Description:
Bring r16982:16997 from trunk into revise_chunks branch.
Tested on:
Mac OS X/32 10.5.7 (amazon)
h5committest not needed on this branch
Diffstat (limited to 'src/H5O.c')
-rw-r--r-- | src/H5O.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -1580,20 +1580,17 @@ H5O_protect(H5O_loc_t *loc, hid_t dxpl_id) /* Lock the object header into the cache */ if(NULL == (ret_value = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, NULL, NULL, H5AC_WRITE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header") /* Mark object header as un-evictable */ - if(H5AC_pin_protected_entry(loc->file, ret_value) < 0) { - if(H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, ret_value, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_OHDR, H5E_PROTECT, NULL, "unable to release object header") - + if(H5AC_pin_protected_entry(loc->file, ret_value) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, NULL, "unable to pin object header") - } /* end if */ +done: /* Release the object header from the cache */ if(H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, ret_value, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_PROTECT, NULL, "unable to release object header") -done: + HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header") + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_protect() */ |