]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
lockd: Correct kernel-doc status descriptions for NLMv4 GRANTED
authorChuck Lever <chuck.lever@oracle.com>
Tue, 12 May 2026 18:13:37 +0000 (14:13 -0400)
committerChuck Lever <cel@kernel.org>
Tue, 9 Jun 2026 20:32:59 +0000 (16:32 -0400)
NLM_GRANTED is a server-to-client callback; the local node
responds in the role of the client. The kernel-doc for
nlm4svc_proc_granted attributes NLM4_DENIED and
NLM4_DENIED_GRACE_PERIOD to "the server", but per the Open
Group XNFS specification the responder for this procedure is
the client host, and NLM4_DENIED_GRACE_PERIOD identifies the
client's own grace period after a reboot, not the server's.

Rewrite the descriptions to match the spec: NLM4_DENIED
reflects the generic internal-resource-constraint failure, and
NLM4_DENIED_GRACE_PERIOD attributes the grace period to the
client host that received the callback.

Fixes: 7a9f7c8f934e ("lockd: Use xdrgen XDR functions for the NLMv4 GRANTED procedure")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/svc4proc.c

index 41cab858de5782643a088a0fd5bc8e5da18bf9e3..fc9ed4abb7caf6e63b4b1695488ebbb808149cae 100644 (file)
@@ -513,12 +513,12 @@ out:
  *   nlm4_res NLMPROC4_GRANTED(nlm4_testargs) = 5;
  *
  * Permissible procedure status codes:
- *   %NLM4_GRANTED:            The requested lock was granted.
- *   %NLM4_DENIED:             The server could not allocate the resources
- *                             needed to process the request.
- *   %NLM4_DENIED_GRACE_PERIOD:        The server has recently restarted and is
- *                             re-establishing existing locks, and is not
- *                             yet ready to accept normal service requests.
+ *   %NLM4_GRANTED:            The granted lock was accepted.
+ *   %NLM4_DENIED:             The procedure failed, possibly due to
+ *                             internal resource constraints.
+ *   %NLM4_DENIED_GRACE_PERIOD:        The client host recently restarted and
+ *                             its NLM is re-establishing existing locks,
+ *                             so it is not yet ready to accept callbacks.
  */
 static __be32
 nlm4svc_proc_granted(struct svc_rqst *rqstp)