From b982541ab6047356693365de0e13b882cacf08b6 Mon Sep 17 00:00:00 2001 From: Christopher Hoffman Date: Fri, 8 Nov 2024 14:00:43 +0000 Subject: [PATCH] client: Ensure file_cache cap is released. Fixes: https://tracker.ceph.com/issues/68798 Fixes: https://tracker.ceph.com/issues/68831 Signed-off-by: Christopher Hoffman --- src/client/Client.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 9f6fbcf51c7..375af11f6f3 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -11681,6 +11681,8 @@ int Client::_read_async(Fh *f, uint64_t off, uint64_t len, bufferlist *bl, client_lock.lock(); put_cap_ref(in, CEPH_CAP_FILE_CACHE); + } else { + put_cap_ref(in, CEPH_CAP_FILE_CACHE); } if (r >= 0) { @@ -11695,8 +11697,6 @@ int Client::_read_async(Fh *f, uint64_t off, uint64_t len, bufferlist *bl, r = bl->length(); update_read_io_size(bl->length()); - } else { - put_cap_ref(in, CEPH_CAP_FILE_CACHE); } do_readahead(f, in, off, len); -- 2.39.5