aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2006-08-22 20:06:23 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:53 -0400
commit94a6d75320b3681e6e728b70e18bd186cb55e682 (patch)
tree0957071549d76ceb3857e419998818b11bce7269 /fs/nfs/nfs4proc.c
parent873101b33776780d32610fc4c90c7358a5e98f51 (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/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 2d18eac6bee5..7f60beb40df3 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2085,7 +2085,7 @@ static int nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *n
2085} 2085}
2086 2086
2087static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry, 2087static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
2088 struct qstr *path, struct iattr *sattr) 2088 struct page *page, unsigned int len, struct iattr *sattr)
2089{ 2089{
2090 struct nfs_server *server = NFS_SERVER(dir); 2090 struct nfs_server *server = NFS_SERVER(dir);
2091 struct nfs_fh fhandle; 2091 struct nfs_fh fhandle;
@@ -2111,10 +2111,11 @@ static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
2111 }; 2111 };
2112 int status; 2112 int status;
2113 2113
2114 if (path->len > NFS4_MAXPATHLEN) 2114 if (len > NFS4_MAXPATHLEN)
2115 return -ENAMETOOLONG; 2115 return -ENAMETOOLONG;
2116 2116
2117 arg.u.symlink = path; 2117 arg.u.symlink.pages = &page;
2118 arg.u.symlink.len = len;
2118 nfs_fattr_init(&fattr); 2119 nfs_fattr_init(&fattr);
2119 nfs_fattr_init(&dir_fattr); 2120 nfs_fattr_init(&dir_fattr);
2120 2121
@@ -2128,13 +2129,14 @@ static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
2128} 2129}
2129 2130
2130static int nfs4_proc_symlink(struct inode *dir, struct dentry *dentry, 2131static int nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
2131 struct qstr *path, struct iattr *sattr) 2132 struct page *page, unsigned int len, struct iattr *sattr)
2132{ 2133{
2133 struct nfs4_exception exception = { }; 2134 struct nfs4_exception exception = { };
2134 int err; 2135 int err;
2135 do { 2136 do {
2136 err = nfs4_handle_exception(NFS_SERVER(dir), 2137 err = nfs4_handle_exception(NFS_SERVER(dir),
2137 _nfs4_proc_symlink(dir, dentry, path, sattr), 2138 _nfs4_proc_symlink(dir, dentry, page,
2139 len, sattr),
2138 &exception); 2140 &exception);
2139 } while (exception.retry); 2141 } while (exception.retry);
2140 return err; 2142 return err;