aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2018-03-27 10:54:21 -0400
committerJ. Bruce Fields <bfields@redhat.com>2018-04-03 15:08:16 -0400
commit38a70315599dedacd9ff3bd1016f9048c9d0ad12 (patch)
tree047a3d88ea7e400827c806be98c8a22c35428db8 /fs/nfsd/xdr4.h
parentNFSD: Clean up legacy NFS WRITE argument XDR decoders (diff)
downloadlinux-dev-38a70315599dedacd9ff3bd1016f9048c9d0ad12.tar.xz
linux-dev-38a70315599dedacd9ff3bd1016f9048c9d0ad12.zip
NFSD: Clean up legacy NFS SYMLINK argument XDR decoders
Move common code in NFSD's legacy SYMLINK decoders into a helper. The immediate benefits include: - one fewer data copies on transports that support DDP - consistent error checking across all versions - reduction of code duplication - support for both legal forms of SYMLINK requests on RDMA transports for all versions of NFS (in particular, NFSv2, for completeness) In the long term, this helper is an appropriate spot to perform a per-transport call-out to fill the pathname argument using, say, RDMA Reads. Filling the pathname in the proc function also means that eventually the incoming filehandle can be interpreted so that filesystem- specific memory can be allocated as a sink for the pathname argument, rather than using anonymous pages. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r--fs/nfsd/xdr4.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 7cbc129092fe..468020fe2a07 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -110,6 +110,7 @@ struct nfsd4_create {
struct {
u32 datalen;
char *data;
+ struct kvec first;
} link; /* NF4LNK */
struct {
u32 specdata1;
@@ -124,6 +125,7 @@ struct nfsd4_create {
};
#define cr_datalen u.link.datalen
#define cr_data u.link.data
+#define cr_first u.link.first
#define cr_specdata1 u.dev.specdata1
#define cr_specdata2 u.dev.specdata2