git: dd6bdfcd073e - stable/12 - nfscl: Fix processing of a rare Rename reply case
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 17 Dec 2023 21:13:57 UTC
The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=dd6bdfcd073ee8461c7d5a7a8fe336831a57b685 commit dd6bdfcd073ee8461c7d5a7a8fe336831a57b685 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2023-12-03 23:31:01 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2023-12-17 21:13:01 +0000 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. (cherry picked from commit 6aded1e6b2e5549120031032e1c7f8b002882327) --- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 53e3ab9b03ea..0a9c54ce5e1e 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2550,7 +2550,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