summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-06-02 21:17:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-06-02 21:17:26 (GMT)
commitb941208aa1dab642491d9b856e8e1d4912273ffc (patch)
treee74c72bb0c8be7b0106801692df3fc5a76ebf157 /src/H5O.c
parentbae373c32236ad99425154f5fcec4cb185e583d0 (diff)
downloadhdf5-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.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/H5O.c b/src/H5O.c
index 85fda74..8b684d4 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -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() */