diff options
| author | Rick Macklem <rmacklem@FreeBSD.org> | 2026-08-03 23:57:38 +0000 |
|---|---|---|
| committer | Rick Macklem <rmacklem@FreeBSD.org> | 2026-08-04 00:02:47 +0000 |
| commit | 5ab48fb9f7ac43fb1242a678312a02df5d4d5b53 (patch) | |
| tree | 20ccf5b7d3824a7d9d87f704e207c9661ac62b3f | |
| parent | d3a0bf0a79efb0a28d85d48c88d14bc5d89ab00a (diff) | |
nfs_commonkrpc.c: Fix recovery that was broken by 4d80d4913e79
Commit 4d80d4913e79 added a check for nfsess_defunct already
being set. This was incorrect because, once set, nfsess_defunct
remains set and an additional recovery might be needed.
This patch reverts this part of 4d80d4913e79.
PR: 297252
Suggested by: olivier
MFC after: 3 days
Fixes: 4d80d4913e79 ("nfs: Fix argument typo to avoid a crash")
| -rw-r--r-- | sys/fs/nfs/nfs_commonkrpc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index dd189a4aa909..705e65d81d41 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1279,9 +1279,15 @@ tryagain: } sep = NFSMNT_MDSSESSION(nmp); if (bcmp(sep->nfsess_sessionid, - nd->nd_sessionid, NFSX_V4SESSIONID) == 0 && - sep->nfsess_defunct == 0) { - /* Initiate recovery. */ + nd->nd_sessionid, NFSX_V4SESSIONID) == 0) { + /* + * Initiate recovery. Even if + * nfsess_defunct is already set, + * another recovery may be needed. + * NFSCLFLAGS_RECVRINPRG | + * NFSCLFLAGS_RECOVER should avoid + * recovery storms. + */ sep->nfsess_defunct = 1; NFSCL_DEBUG(1, "Marked defunct\n"); if (nmp->nm_clp != NULL && |
