]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
uclient: remove useless if-else based on snapid
authorGreg Farnum <gregory.farnum@dreamhost.com>
Mon, 28 Nov 2011 18:32:07 +0000 (10:32 -0800)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Mon, 28 Nov 2011 18:32:07 +0000 (10:32 -0800)
These are the same command anyway!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/client/Client.cc

index 78d12c8ed5f8fe5bee5d9cce0b2ee0efb7d0f540..2347f7ce984e854e287412fd6bff4d5b58019737 100644 (file)
@@ -5144,12 +5144,8 @@ int Client::_read_async(Fh *f, uint64_t off, uint64_t len, bufferlist *bl)
   Cond cond;
   bool done = false;
   Context *onfinish = new C_SafeCond(&flock, &cond, &done, &rvalue);
-  if (in->snapid == CEPH_NOSNAP)
-    r = objectcacher->file_read(&in->oset, &in->layout, in->snapid,
-                               off, len, bl, 0, onfinish);
-  else
-    r = objectcacher->file_read(&in->oset, &in->layout, in->snapid,
-                               off, len, bl, 0, onfinish);
+  r = objectcacher->file_read(&in->oset, &in->layout, in->snapid,
+                              off, len, bl, 0, onfinish);
   if (r == 0) {
     while (!done) 
       cond.Wait(client_lock);