librbd: tolerate ENOENT when trying to delete an object.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This commit is contained in:
Greg Farnum 2011-05-11 10:38:59 -07:00
parent 140886c8c4
commit 8d201d4bfb

View File

@ -673,7 +673,7 @@ int rename(IoCtx& io_ctx, const char *srcname, const char *dstname)
derr << "warning: couldn't remove old entry from directory (" << imgname_str << ")" << dendl;
r = io_ctx.remove(md_oid);
if (r < 0)
if (r < 0 && r != -ENOENT)
derr << "warning: couldn't remove old metadata" << dendl;
notify_change(io_ctx, md_oid, NULL, NULL);