Linux NFS development
 help / color / mirror / Atom feed
From: daffyduck via Bugspray Bot <bugbot@kernel.org>
To: linux-nfs@vger.kernel.org, anna@kernel.org, cel@kernel.org,
	 jlayton@kernel.org, trondmy@kernel.org
Subject: Re: kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz)
Date: Thu, 03 Dec 2026 16:42:45 +0000	[thread overview]
Message-ID: <20261203-b221631c2-b24ccad397f7@bugzilla.kernel.org> (raw)
In-Reply-To: <20261203-b221631c0-5636da63b9c8@bugzilla.kernel.org>

daffyduck writes via Kernel.org Bugzilla:

The kernel "works" with that ridiculous patch of mine, but I didn't test nfs.

I'm now doing another kernel build (same kernel version, same gcc version), but this time I applied the patch as mentioned at the end of this post:
https://lkml.org/lkml/2025/11/10/12

So I'll report how it went... but still I won't test nfs, I'll only compile and boot the kernel with the patch.

Here I copy-paste the patch from that post:

---
 fs/nfsd/nfs4state.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 08bfc2b29b65..d485a140d36d 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1822,8 +1822,9 @@ static u32 nfsd4_get_drc_mem(struct nfsd4_channel_attrs *ca, struct nfsd_net *nn
 	 */
 	scale_factor = max_t(unsigned int, 8, nn->nfsd_serv->sv_nrthreads);
 
-	avail = clamp_t(unsigned long, avail, slotsize,
-			total_avail/scale_factor);
+	avail = __clamp((unsigned long)avail,
+			(unsigned long)slotsize,
+			(unsigned long)(total_avail/scale_factor));
 	num = min_t(int, num, avail / slotsize);
 	num = max_t(int, num, 1);
 	nfsd_drc_mem_used += num * slotsize;
--

View: https://bugzilla.kernel.org/show_bug.cgi?id=221631#c2
You can reply to this message to join the discussion.
-- 
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)


  parent reply	other threads:[~2026-12-03 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 16:42 kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz) daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot [this message]
2026-12-03 16:42 ` daffyduck via Bugspray Bot
2026-12-03 16:42 ` Chuck Lever via Bugspray Bot
2026-12-03 16:42   ` daffyduck via Bugspray Bot

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=20261203-b221631c2-b24ccad397f7@bugzilla.kernel.org \
    --to=bugbot@kernel.org \
    --cc=anna@kernel.org \
    --cc=cel@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    /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