]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: simplify OperationThrottler::with_throttle()
authorRadosław Zarzyński <rzarzyns@redhat.com>
Sat, 2 Apr 2022 09:13:18 +0000 (11:13 +0200)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Thu, 5 May 2022 02:06:31 +0000 (04:06 +0200)
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/crimson/osd/osd_operation.h

index c9cba7e7eb607397362e39fdc0ead4bd9373357a..d883af55b8f470b5af82814e55b5061421064634 100644 (file)
@@ -205,10 +205,7 @@ public:
     crimson::osd::scheduler::params_t params,
     F &&f) {
     return with_throttle(op, params, f).then([this, params, op, f](bool cont) {
-      if (cont)
-       return with_throttle_while(op, params, f);
-      else
-       return seastar::make_ready_future<>();
+      return cont ? with_throttle_while(op, params, f) : seastar::now();
     });
   }