Linux NFS development
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: chuck.lever@oracle.com, jlayton@kernel.org
Cc: neilb@suse.de, kolga@netapp.com, Dai.Ngo@oracle.com,
	tom@talpey.com, linux-nfs@vger.kernel.org
Subject: [PATCH] nfsd: remove unnecessary cache_put from idmap_lookup
Date: Mon,  5 Aug 2024 18:57:15 +0800	[thread overview]
Message-ID: <20240805105715.11660-1-guoqing.jiang@linux.dev> (raw)

It is not needed given cache_check already calls cache_put on failure,
otherwise we call cache_put twice in case of -ETIMEDOUT.   

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
---
 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


             reply	other threads:[~2024-08-05 10:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-05 10:57 Guoqing Jiang [this message]
2024-08-06 23:58 ` [PATCH] nfsd: remove unnecessary cache_put from idmap_lookup NeilBrown
2024-08-07 12:29   ` Guoqing Jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240805105715.11660-1-guoqing.jiang@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=Dai.Ngo@oracle.com \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=kolga@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox