]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: unlink of nonexistent object should return -ENOENT
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 10 May 2011 21:20:19 +0000 (14:20 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 10 May 2011 21:20:19 +0000 (14:20 -0700)
fixes bug #1078.

src/osd/ReplicatedPG.cc

index ffa12f36f131b9a557c919c716e645a361ced048..d6fd679752a60536b2faffe21ec1b179aaae477f 100644 (file)
@@ -1503,6 +1503,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops,
       break;
     
     case CEPH_OSD_OP_DELETE:
+      if (!obs.exists)
+        result = -ENOENT;
       _delete_head(ctx);
       break;