Re: [PATCH 4/4] ceph: release unused cap reservation on readdir error
From: Viacheslav Dubeyko
Date: Wed Jul 15 2026 - 13:54:22 EST
On Wed, 2026-07-15 at 20:06 +0530, deepakraog wrote:
> ceph_readdir_prepopulate() can exit with an error after partially
> consuming the request's cap reservation. Return unused reserved caps
> to
> the MDS client pool on the error path so they are not held until
> request
> teardown.
The ceph-devel list has received only 4/4 patch. Is it some patchset?
If so, then why we haven't received the rest patches in series?
Do you have any issue related to the fix? How have you encountered the
issue? Could you please explain more about the issue?
Thanks,
Slava.
>
> Signed-off-by: deepakraog <gaikwad.dcg@xxxxxxxxx>
> ---
> fs/ceph/inode.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
> index 61d7c0b81..2d6a80054 100644
> --- a/fs/ceph/inode.c
> +++ b/fs/ceph/inode.c
> @@ -2188,6 +2188,8 @@ int ceph_readdir_prepopulate(struct
> ceph_mds_request *req,
> dput(dn);
> }
> out:
> + if (err)
> + ceph_unreserve_caps(req->r_mdsc, &req-
> >r_caps_reservation);
> if (err == 0 && skipped == 0) {
> set_bit(CEPH_MDS_R_DID_PREPOPULATE, &req-
> >r_req_flags);
> req->r_readdir_cache_idx = cache_ctl.index;