nfs_nfsdsocket.c: Fix "nfsstats -d" for ERELOOKUP

When ERELOOKLUP is returned by a file operation
(always vop_lookup?) the operation is retried without
doing nfsrv_statsend().

This patch fixes this problem,

The only effect of the bug was bogus "nfsstat -d"
output.

PR:	298534
Reviewed by:	rmacklem
MFC after:	1 week
This commit is contained in:
Bren authored and Rick Macklem committed 2026-10-08 12:03:51 -07:00
1 parent cb3d3e5bb0
commit 9a237074d3
1 file changed
+7
+7
View File
@@ -652,6 +652,8 @@ tryagain:
vn_finished_write(mp);
if (error == 0 && nd->nd_repstat == ERELOOKUP) {
nfsrvd_statend(nfsv3to4op[nd->nd_procnum], /*bytes*/ 0,
/*now*/ NULL, /*then*/ &start_time);
/*
* Roll back to the beginning of the RPC request
* arguments.
@@ -1353,6 +1355,11 @@ tryagain:
}
if (nd->nd_repstat == ERELOOKUP) {
if (statsinprog != 0) {
nfsrvd_statend(op, /*bytes*/ 0, /*now*/ NULL,
/*then*/ &start_time);
statsinprog = 0;
}
/*
* Roll back to the beginning of the operation
* arguments.