summaryrefslogtreecommitdiff
path: root/fs/lockd/svcxdr.h
AgeCommit message (Collapse)Author
2026-06-09lockd: Remove dead code from fs/lockd/xdr.cChuck Lever
All NLMv3 server-side procedures now dispatch through xdrgen-generated encoder and decoder functions, leaving the hand-written XDR processing in fs/lockd/xdr.c with no remaining callers. Remove fs/lockd/xdr.c, the fs/lockd/svcxdr.h header it included, the Makefile entry, and the now-unused nlmsvc_decode_* / nlmsvc_encode_* prototypes from fs/lockd/xdr.h. The structure definitions and status code macros in xdr.h are retained as they are still used by the client-side code. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2026-06-09lockd: Rename struct nlm_cookie to lockd_cookieChuck Lever
Machine-generated XDR types derived from the NLM specification use names that match the protocol. Internal lockd types with identical names cause compilation failures when machine-generated encoders replace hand-coded ones. Rename the internal struct nlm_cookie type to lockd_cookie to prevent such collisions. The "lockd_" prefix distinguishes implementation-specific types from specified NLM protocol types. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2021-09-17NLM: Fix svcxdr_encode_owner()Chuck Lever
Dai Ngo reports that, since the XDR overhaul, the NLM server crashes when the TEST procedure wants to return NLM_DENIED. There is a bug in svcxdr_encode_owner() that none of our standard test cases found. Replace the open-coded function with a call to an appropriate pre-fabricated XDR helper. Reported-by: Dai Ngo <Dai.Ngo@oracle.com> Fixes: a6a63ca5652e ("lockd: Common NLM XDR helpers") Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2021-07-06lockd: Common NLM XDR helpersChuck Lever
Add a .h file containing xdr_stream-based XDR helpers common to both NLMv3 and NLMv4. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>