From a2a10b344d684c7058e9af12c54dd9ed312f83d4 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Thu, 22 Mar 2018 11:01:03 +0800 Subject: [PATCH] client: fix Client::_read return when reading from inline data, it return 0. introduced by commit 608aafb9 "client: cleanup ::_read return" Fixes: http://tracker.ceph.com/issues/23436 Signed-off-by: Yan, Zheng --- src/client/Client.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 6c464d5a366..1209d4ab3c8 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -8788,7 +8788,6 @@ retry: uninline_data(in, onuninline.get()); } else { uint32_t len = in->inline_data.length(); - uint64_t endoff = offset + size; if (endoff > in->size) endoff = in->size; @@ -8803,7 +8802,7 @@ retry: } else if ((uint64_t)offset < endoff) { bl->append_zero(endoff - offset); } - + r = endoff - offset; goto success; } }