]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG.cc: fix error handling for CEPH_OSD_OP_NOTIFY_ACK
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 5 Jun 2015 14:02:57 +0000 (16:02 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 17 Jul 2015 08:50:07 +0000 (10:50 +0200)
The error handling wasn't correct. In error case call break from
within the for loop doesn't break out of the switch handling as
expected.

Fix for:

CID 1297888 (#1 of 2): Unused value (UNUSED_VALUE)
 assigned_value: Assigning value -22 to result here, but that
 stored value is overwritten before it can be used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osd/ReplicatedPG.cc

index 7ad5d7ca471483e6856806d9c1c49568b53a71e4..45465c1466bff32353aa5de9b713c3af33b7c530 100644 (file)
@@ -4029,6 +4029,9 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 
           resp.clones.push_back(ci);
         }
+       if (result < 0) {
+         break;
+       }         
         if (ssc->snapset.head_exists &&
            !ctx->obc->obs.oi.is_whiteout()) {
           assert(obs.exists);