osdc: In realease(Object *) make the error bh as clean and later remove.

Avoid met this assert error:
  osdc/ObjectCacher.cc: 551: FAILED assert(i->empty())

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
This commit is contained in:
Jianpeng Ma 2015-02-03 14:59:05 +08:00
parent 540346d4a9
commit 0bedae366c

View File

@ -1798,7 +1798,7 @@ loff_t ObjectCacher::release(Object *ob)
p != ob->data.end();
++p) {
BufferHead *bh = p->second;
if (bh->is_clean() || bh->is_zero())
if (bh->is_clean() || bh->is_zero() || bh->is_error())
clean.push_back(bh);
else
o_unclean += bh->length();