]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
SimpleThrottle: fix -ENOENT checking 281/head
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 13 May 2013 21:49:42 +0000 (14:49 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 13 May 2013 21:49:46 +0000 (14:49 -0700)
The condition was reversed. Rewrite it so it's clear that we're
ignoring -ENOENT only when m_ignore_enoent is set.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/common/Throttle.cc

index bfa1ae46040364cf02001f04a98282cf3c3ffa6b..7c097e2d87c34c28ba70e879470f177a4b3f08d2 100644 (file)
@@ -237,7 +237,7 @@ void SimpleThrottle::end_op(int r)
 {
   Mutex::Locker l(m_lock);
   --m_current;
-  if (r < 0 && !m_ret && (r != -ENOENT || m_ignore_enoent))
+  if (r < 0 && !m_ret && !(r == -ENOENT && m_ignore_enoent))
     m_ret = r;
   m_cond.Signal();
 }