Re: [PATCH 4/4] ceph: release unused cap reservation on readdir error
Viacheslav Dubeyko <[email protected]> Wed, 15 Jul 2026 10:51:31 -0700
| Newsgroups | org.kernel.vger.ceph-devel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> > --- > 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;