diff options
author | Rick Macklem <rmacklem@FreeBSD.org> | 2023-12-03 23:31:01 +0000 |
---|---|---|
committer | Rick Macklem <rmacklem@FreeBSD.org> | 2023-12-03 23:31:01 +0000 |
commit | 6aded1e6b2e5549120031032e1c7f8b002882327 (patch) | |
tree | c10ed8d10065a6d5dcd76ddc0df9ba5b96efd1ad | |
parent | 7d0ee5ebd052d35e323f2d303e467c2cf305ca39 (diff) | |
download | src-6aded1e6b2e5549120031032e1c7f8b002882327.tar.gz src-6aded1e6b2e5549120031032e1c7f8b002882327.zip |
nfscl: Fix processing of a rare Rename reply case
When delegations are enabled (they are not by default in
the FreeBSD NFSv4 server), rename will check for and return
delegations. If the second of these DelegReturn operations
were to fail (they rarely do), then the code would not retry
the rename with returning delegations, as it is intended to do.
The patch fixes the problem, since the DelegReturn reply status
is the second iteration of the loop and not the first iteration.
As noted, this bug would have rarely manifested a problem, since
DelegReturn operations do not normally fail.
MFC after: 2 weeks
-rw-r--r-- | sys/fs/nfsclient/nfs_clrpcops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 1b0011760d10..81871dc885cd 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -3001,7 +3001,7 @@ tryagain: ND_NFSV4) { NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); if (*(tl + 1)) { - if (i == 0 && ret > 1) { + if (i == 1 && ret > 1) { /* * If the Delegreturn failed, try again * without it. The server will Recall, as |