]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: fix non-encrypted case in read_sync
authorChristopher Hoffman <choffman@redhat.com>
Tue, 21 May 2024 16:54:35 +0000 (16:54 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Thu, 14 Aug 2025 20:08:08 +0000 (20:08 +0000)
Only append pbl to bl if encrypted case.

Fixes: https://tracker.ceph.com/issues/65964
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/client/Client.cc

index be1206a3246caabb14042377026e87648d487f9a..9494b124e15c3b22e4a188b51e33bd196075bdf4 100644 (file)
@@ -11794,10 +11794,10 @@ int Client::_read_sync(Fh *f, uint64_t off, uint64_t len, bufferlist *bl,
       if (r < 0) {
         ldout(cct, 20) << __func__ << "(): failed to decrypt buffer: r=" << r << dendl;
       }
+      bl->claim_append(*pbl);
     }
 
     read = pbl->length();
-    bl->claim_append(*pbl);
   }
   return read;
 }