From: Petr Vorel <pvorel@suse.cz>
To: Jeff Layton <jlayton@kernel.org>
Cc: chuck.lever@oracle.com, linux-nfs@vger.kernel.org,
regressions@lists.linux.dev,
Torsten Hilbrich <torsten.hilbrich@secunet.com>
Subject: Re: [PATCH v2] nfsd: fix net-namespace logic in __nfsd_file_cache_purge
Date: Fri, 4 Nov 2022 22:21:56 +0100 [thread overview]
Message-ID: <Y2WCdDAGt1OEFzL7@pevik> (raw)
In-Reply-To: <20221031154921.500620-1-jlayton@kernel.org>
Hi all,
> If the namespace doesn't match the one in "net", then we'll continue,
> but that doesn't cause another rhashtable_walk_next call, so it will
> loop infinitely.
> Fixes: ce502f81ba88 ("NFSD: Convert the filecache to use rhashtable")
Adding this to regression tracker.
https://linux-regtracking.leemhuis.info/tracked-regression/
#regzbot ^introduced ce502f81ba88
#regzbot ignore-activity
Kind regards,
Petr
> Reported-by: Petr Vorel <pvorel@suse.cz>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/nfsd/filecache.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
> The v1 patch applies cleanly to v6.0, but not to Chuck's for-next
> branch. This one should be suitable there.
> diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
> index 98c6b5f51bc8..4a8aa7cd8354 100644
> --- a/fs/nfsd/filecache.c
> +++ b/fs/nfsd/filecache.c
> @@ -890,9 +890,8 @@ __nfsd_file_cache_purge(struct net *net)
> nf = rhashtable_walk_next(&iter);
> while (!IS_ERR_OR_NULL(nf)) {
> - if (net && nf->nf_net != net)
> - continue;
> - nfsd_file_unhash_and_dispose(nf, &dispose);
> + if (!net || nf->nf_net == net)
> + nfsd_file_unhash_and_dispose(nf, &dispose);
> nf = rhashtable_walk_next(&iter);
> }
next prev parent reply other threads:[~2022-11-04 21:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 15:49 [PATCH v2] nfsd: fix net-namespace logic in __nfsd_file_cache_purge Jeff Layton
2022-10-31 17:10 ` Chuck Lever III
2022-10-31 18:45 ` Petr Vorel
2022-10-31 18:46 ` Jeff Layton
2022-10-31 18:47 ` Chuck Lever III
2022-10-31 19:05 ` Petr Vorel
2022-11-04 21:21 ` Petr Vorel [this message]
2022-11-09 15:53 ` [PATCH v2] nfsd: fix net-namespace logic in __nfsd_file_cache_purge #forregzbot Thorsten Leemhuis
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=Y2WCdDAGt1OEFzL7@pevik \
--to=pvorel@suse.cz \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=torsten.hilbrich@secunet.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