]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
SyntheticClient.cc: remove dead code
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 1 Oct 2014 13:49:17 +0000 (15:49 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 1 Oct 2014 14:03:34 +0000 (16:03 +0200)
Fix for coverity issue:

const: At condition unsafe > 0, the value of unsafe must be equal to 0.
dead_error_condition: The condition unsafe > 0 cannot be true.

CID 716892 (#1 of 1): Logically dead code (DEADCODE)
dead_error_begin: Execution cannot reach this statement

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

index 7b4f4a41ed70f9a2e715ddee5248812aec9debde..bf8491aeca3a744c74262775a7f7af5b146597c8 100644 (file)
@@ -2348,7 +2348,6 @@ int SyntheticClient::object_rw(int nobj, int osize, int wrpc,
   Cond cond;
 
   int unack = 0;
-  int unsafe = 0;
 
   while (1) {
     if (time_to_stop()) break;
@@ -2390,9 +2389,6 @@ int SyntheticClient::object_rw(int nobj, int osize, int wrpc,
       }
       client->objecter->mutate(oid, oloc, m, snapc, ceph_clock_now(client->cct), 0,
                               NULL, new C_Ref(lock, cond, &unack));
-      /*client->objecter->write(oid, layout, 0, osize, snapc, bl, 0,
-                             new C_Ref(lock, cond, &unack),
-                             new C_Ref(lock, cond, &unsafe));*/
     } else {
       dout(10) << "read from " << oid << dendl;
       bufferlist inbl;
@@ -2418,13 +2414,6 @@ int SyntheticClient::object_rw(int nobj, int osize, int wrpc,
     }
   }
 
-
-  lock.Lock();
-  while (unsafe > 0) {
-    dout(10) << "waiting for " << unsafe << " unsafe" << dendl;
-    cond.Wait(lock);
-  }
-  lock.Unlock();
   return 0;
 }