]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/cache/pwl: fix -Wunused-lambda-capture warnings
authorIlya Dryomov <idryomov@gmail.com>
Tue, 19 Apr 2022 09:21:05 +0000 (11:21 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 19 Apr 2022 09:21:05 +0000 (11:21 +0200)
Reported by clang on "make check" and "make check arm64" builds.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/cache/pwl/AbstractWriteLog.cc
src/librbd/cache/pwl/Request.cc
src/librbd/cache/pwl/ssd/LogOperation.cc

index aa18de0bcd95a48c0fd5be78a680452fdeb2d277..49f4161effe07fbf2874325df16ae59d135be3e2 100644 (file)
@@ -1418,7 +1418,7 @@ void AbstractWriteLog<I>::dispatch_deferred_writes(void)
       if (allocated_req && front_req && allocated) {
         /* Push dispatch of the first allocated req to a wq */
         m_work_queue.queue(new LambdaContext(
-          [this, allocated_req](int r) {
+          [allocated_req](int r) {
             allocated_req->dispatch();
           }), 0);
         allocated_req = nullptr;
@@ -1901,7 +1901,7 @@ void AbstractWriteLog<I>::new_sync_point(DeferredContexts &later) {
     /* This sync point will acquire no more sub-ops. Activation needs
      * to acquire m_lock, so defer to later*/
     later.add(new LambdaContext(
-      [this, old_sync_point](int r) {
+      [old_sync_point](int r) {
         old_sync_point->prior_persisted_gather_activate();
       }));
   }
@@ -1958,7 +1958,7 @@ void AbstractWriteLog<I>::flush_new_sync_point(C_FlushRequestT *flush_req,
    * now has its finisher. If the sub is already complete, activation will
    * complete the Gather. The finisher will acquire m_lock, so we'll activate
    * this when we release m_lock.*/
-  later.add(new LambdaContext([this, to_append](int r) {
+  later.add(new LambdaContext([to_append](int r) {
     to_append->persist_gather_activate();
   }));
 
index c5dea8c8399df99cdbe84c6a79bea65b51785946..96333192527ff01515250cfb3fdadb6b800ae246 100644 (file)
@@ -251,7 +251,7 @@ bool C_WriteRequest<T>::append_write_request(std::shared_ptr<SyncPoint> sync_poi
   std::lock_guard locker(m_lock);
   auto write_req_sp = this;
   if (sync_point->earlier_sync_point) {
-    Context *schedule_append_ctx = new LambdaContext([this, write_req_sp](int r) {
+    Context *schedule_append_ctx = new LambdaContext([write_req_sp](int r) {
         write_req_sp->schedule_append();
       });
     sync_point->earlier_sync_point->on_sync_point_appending.push_back(schedule_append_ctx);
index f759d8a8eeec5c04cd5ce954a43699f737833661..c8080e37d0f5059260bb6a9a8ad1d790bd4df322 100644 (file)
@@ -20,7 +20,7 @@ void DiscardLogOperation::init_op(
   log_entry->init(current_sync_gen, persist_on_flush, last_op_sequence_num);
   if (persist_on_flush) {
     this->on_write_append = new LambdaContext(
-        [this, write_persist, write_append] (int r) {
+        [write_persist, write_append] (int r) {
         write_append->complete(r);
         write_persist->complete(r);
         });