summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-07-20 16:21:50 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2018-07-26 22:23:01 (GMT)
commit56d1d200b81b00284a2aa62d401b97d076145f12 (patch)
tree7b9ecbebc48c1249a9daf46dde121e1e620d85e9 /src
parentc992df8d8ff43f49f553d13bbd666b5f98625a88 (diff)
downloadhdf5-56d1d200b81b00284a2aa62d401b97d076145f12.zip
hdf5-56d1d200b81b00284a2aa62d401b97d076145f12.tar.gz
hdf5-56d1d200b81b00284a2aa62d401b97d076145f12.tar.bz2
Fix for HDFFV-9277: update the ainfo message after removing an attribute.
Diffstat (limited to 'src')
-rw-r--r--src/H5Oattribute.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index e8a8433..640d1c7 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -1448,6 +1448,12 @@ H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo)
} /* end if */
} /* end if */
+ /* Update the message after removing the attribute */
+ /* This is particularly needed when removing the last attribute that is
+ accessed via fractal heap/v2 B-tree (HDFFV-9277) */
+ if(H5O__msg_write_real(loc->file, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0, ainfo) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info message")
+
/* Check if we have deleted all the attributes and the attribute info
* message should be deleted itself.
*/
@@ -1455,9 +1461,6 @@ H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo)
if(H5O__msg_remove_real(loc->file, oh, H5O_MSG_AINFO, H5O_ALL, NULL, NULL, TRUE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute info")
} /* end if */
- else
- if(H5O__msg_write_real(loc->file, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0, ainfo) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info message")
done:
/* Release resources */