]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Wed, 5 Nov 2025 13:59:34 +0000 (13:59 +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 e2355f604194a9a337ba051a0a0632943368518b..a3190934705eeb4d77c167862e7709895625f5d9 100644 (file)
@@ -11861,10 +11861,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;
 }