git: bc7366a340ed - main - nfs_nfsdstate.c: Partial revert of 64857418bb23

From: Rick Macklem <rmacklem_at_FreeBSD.org>
Date: Mon, 02 Nov 2026 15:02:43 UTC
The branch main has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=bc7366a340edb366c37352c636b8360de92aa3a2

commit bc7366a340edb366c37352c636b8360de92aa3a2
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2026-11-02 15:00:40 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-11-02 15:00:40 +0000

    nfs_nfsdstate.c: Partial revert of 64857418bb23
    
    Dropping the cached reply that is too large causes
    a correctness problem that is too difficult to fix,
    so revert this and leave it the way it was.
    
    Although there is an argument that not doing could
    cause resource exhaustion, it has not been reported
    in the field as a problem.
    
    MFC after:      1 month
---
 sys/fs/nfsserver/nfs_nfsdstate.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c
index de0c729acfa6..2fdce567c1ce 100644
--- a/sys/fs/nfsserver/nfs_nfsdstate.c
+++ b/sys/fs/nfsserver/nfs_nfsdstate.c
@@ -6222,10 +6222,6 @@ nfsrv_cache_session(struct nfsrv_descript *nd, struct mbuf **m)
 		m_freem(*m);
 		return;
 	}
-	if (*m != NULL && m_length(*m, NULL) > sep->sess_maxrespcached) {
-		m_freem(*m);
-		*m = NULL;
-	}
 	nfsv4_seqsess_cacherep(nd->nd_slotid, sep->sess_slots, nd->nd_repstat,
 	    m);
 	NFSUNLOCKSESSION(shp);