From 395a775a8c87b0ee1ce314257e25240214f4081c Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Mon, 13 May 2013 14:49:42 -0700 Subject: [PATCH] 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 --- src/common/Throttle.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Throttle.cc b/src/common/Throttle.cc index bfa1ae4604036..7c097e2d87c34 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(); } -- 2.39.5