]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/osd_operation.h: clean up duplicative check. 31859/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 25 Nov 2019 15:27:38 +0000 (16:27 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 25 Nov 2019 15:41:04 +0000 (16:41 +0100)
`seastar::future<T>::available()` already verifies whether
a future instance stores exception inside. It's unnecessary
to ensure that with further call to `failed()`.

This tiny clean-up removes the duplicative check in
`with_blocking_future()`.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/osd_operation.h

index 9d7861a0292d440df2e74aa91f493ab80e099036..6fe98d6df08a279c0013283e297ec9d00e3af25f 100644 (file)
@@ -146,7 +146,7 @@ public:
 
   template <typename... T>
   seastar::future<T...> with_blocking_future(blocking_future<T...> &&f) {
-    if (f.fut.available() || f.fut.failed()) {
+    if (f.fut.available()) {
       return std::move(f.fut);
     }
     assert(f.blocker);