diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2006-08-22 20:06:23 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-09-22 23:24:53 -0400 |
commit | 94a6d75320b3681e6e728b70e18bd186cb55e682 (patch) | |
tree | 0957071549d76ceb3857e419998818b11bce7269 /fs/nfs/nfs4xdr.c | |
parent | 873101b33776780d32610fc4c90c7358a5e98f51 (diff) |
NFS: Use cached page as buffer for NFS symlink requests
Now that we have a copy of the symlink path in the page cache, we can pass
a struct page down to the XDR routines instead of a string buffer.
Test plan:
Connectathon, all NFS versions.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 99926067eca4..3dd413f52da1 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -128,7 +128,7 @@ static int nfs4_stat_to_errno(int); | |||
128 | #define decode_link_maxsz (op_decode_hdr_maxsz + 5) | 128 | #define decode_link_maxsz (op_decode_hdr_maxsz + 5) |
129 | #define encode_symlink_maxsz (op_encode_hdr_maxsz + \ | 129 | #define encode_symlink_maxsz (op_encode_hdr_maxsz + \ |
130 | 1 + nfs4_name_maxsz + \ | 130 | 1 + nfs4_name_maxsz + \ |
131 | nfs4_path_maxsz + \ | 131 | 1 + \ |
132 | nfs4_fattr_maxsz) | 132 | nfs4_fattr_maxsz) |
133 | #define decode_symlink_maxsz (op_decode_hdr_maxsz + 8) | 133 | #define decode_symlink_maxsz (op_decode_hdr_maxsz + 8) |
134 | #define encode_create_maxsz (op_encode_hdr_maxsz + \ | 134 | #define encode_create_maxsz (op_encode_hdr_maxsz + \ |
@@ -673,9 +673,9 @@ static int encode_create(struct xdr_stream *xdr, const struct nfs4_create_arg *c | |||
673 | 673 | ||
674 | switch (create->ftype) { | 674 | switch (create->ftype) { |
675 | case NF4LNK: | 675 | case NF4LNK: |
676 | RESERVE_SPACE(4 + create->u.symlink->len); | 676 | RESERVE_SPACE(4); |
677 | WRITE32(create->u.symlink->len); | 677 | WRITE32(create->u.symlink.len); |
678 | WRITEMEM(create->u.symlink->name, create->u.symlink->len); | 678 | xdr_write_pages(xdr, create->u.symlink.pages, 0, create->u.symlink.len); |
679 | break; | 679 | break; |
680 | 680 | ||
681 | case NF4BLK: case NF4CHR: | 681 | case NF4BLK: case NF4CHR: |