diff options
| author | Chuck Lever <cel@kernel.org> | 2026-09-16 12:28:36 -0400 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-10-11 23:12:18 -0400 |
| commit | a19c7990d525bc462bf484860bc1874682a50924 (patch) | |
| tree | b37a756bd41cc45a91f70a75969957106ab46bf0 /tools/lib/python | |
| parent | c9d6f6ba2d15f8df32e04d4329ebf3c10bf8285b (diff) | |
| download | linux-next-a19c7990d525bc462bf484860bc1874682a50924.tar.gz linux-next-a19c7990d525bc462bf484860bc1874682a50924.zip | |
NFSD: Relocate the NFSv2 XDR storage union into nfsproc.c
union nfsd_xdrstore and the NFS2_SVC_XDRSIZE macro it feeds exist
only to compute nfsd_version2.vs_xdrsize, yet xdr.h exposes them to
every file that includes the header. This couples the NFSv2 XDR
type layout to translation units that have no stake in the
service's buffer size.
Move the union next to nfsd_version2 in nfsproc.c, its sole
consumer, and compute vs_xdrsize directly from sizeof(union
nfsd_xdrstore). NFS2_SVC_XDRSIZE then has no users left and is
removed from xdr.h. This mirrors the recent lockd conversion, which
confined each NLM version's storage union to the file that defines
the version structure.
The union also gains the NFSv2 result structures. The svc layer
allocates rqstp->rq_resp at sv_xdrsize -- the largest vs_xdrsize
among a program's versions -- and clears it to the dispatched
procedure's pc_ressize, so vs_xdrsize must bound the largest result
the version encodes, not only its largest argument. The NFSv3
storage union already lists both.
Acked-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260916162859.2051-8-cel@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
