]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: use reply_ctx in a few cases
authorSage Weil <sage@inktank.com>
Tue, 11 Feb 2014 21:43:11 +0000 (13:43 -0800)
committerSage Weil <sage@inktank.com>
Sun, 16 Feb 2014 06:09:39 +0000 (22:09 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc

index 7a9edd25da197c95f1526bf0717a68eb24ee4992..bceaa172596a3e5e5a6f2e338fa794dd65d79ee3 100644 (file)
@@ -1353,8 +1353,7 @@ void ReplicatedPG::do_op(OpRequestRef op)
     map<hobject_t,FlushOpRef>::iterator p = flush_ops.find(obc->obs.oi.soid);
     if (p == flush_ops.end()) {
       dout(10) << __func__ << " no flush in progress, aborting" << dendl;
-      close_op_ctx(ctx, -EINVAL);
-      osd->reply_op_error(op, -EINVAL);
+      reply_ctx(ctx, -EINVAL);
       return;
     }
   } else if (!get_rw_locks(ctx)) {
@@ -1368,14 +1367,12 @@ void ReplicatedPG::do_op(OpRequestRef op)
     // This object is lost. Reading from it returns an error.
     dout(20) << __func__ << ": object " << obc->obs.oi.soid
             << " is lost" << dendl;
-    close_op_ctx(ctx, -ENFILE);
-    osd->reply_op_error(op, -ENFILE);
+    reply_ctx(ctx, -ENFILE);
     return;
   }
   if (!op->may_write() && !op->may_cache() && (!obc->obs.exists ||
                                               obc->obs.oi.is_whiteout())) {
-    close_op_ctx(ctx, -ENOENT);
-    osd->reply_op_error(op, -ENOENT);
+    reply_ctx(ctx, -ENOENT);
     return;
   }