From: Josh Durgin Date: Mon, 13 May 2013 21:49:42 +0000 (-0700) Subject: SimpleThrottle: fix -ENOENT checking X-Git-Tag: v0.63~32^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=395a775a8c87b0ee1ce314257e25240214f4081c;p=ceph.git SimpleThrottle: fix -ENOENT checking 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 --- diff --git a/src/common/Throttle.cc b/src/common/Throttle.cc index bfa1ae460403..7c097e2d87c3 100644 --- a/src/common/Throttle.cc +++ b/src/common/Throttle.cc @@ -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(); }