On Mon, 05 Aug 2024, Guoqing Jiang wrote: > It is not needed given cache_check already calls cache_put on failure, > otherwise we call cache_put twice in case of -ETIMEDOUT. cache_check() was called on a different *item. This cache_put() puts the *item returned by lookup_fn() two lines earlier. The current code is correct. NeilBrown > > Signed-off-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxx> > --- > fs/nfsd/nfs4idmap.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c > index 7a806ac13e31..08a354783d57 100644 > --- a/fs/nfsd/nfs4idmap.c > +++ b/fs/nfsd/nfs4idmap.c > @@ -521,7 +521,6 @@ idmap_lookup(struct svc_rqst *rqstp, > *item = lookup_fn(detail, key); > if (*item != prev_item) > goto retry; > - cache_put(&(*item)->h, detail); > } > return ret; > } > -- > 2.35.3 > >