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/proc.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/proc.c')
-rw-r--r-- | fs/nfs/proc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 0b507bf0f330..630e50647bbb 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -425,8 +425,8 @@ nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) | |||
425 | } | 425 | } |
426 | 426 | ||
427 | static int | 427 | static int |
428 | nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct qstr *path, | 428 | nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct page *page, |
429 | struct iattr *sattr) | 429 | unsigned int len, struct iattr *sattr) |
430 | { | 430 | { |
431 | struct nfs_fh fhandle; | 431 | struct nfs_fh fhandle; |
432 | struct nfs_fattr fattr; | 432 | struct nfs_fattr fattr; |
@@ -434,8 +434,8 @@ nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct qstr *path, | |||
434 | .fromfh = NFS_FH(dir), | 434 | .fromfh = NFS_FH(dir), |
435 | .fromname = dentry->d_name.name, | 435 | .fromname = dentry->d_name.name, |
436 | .fromlen = dentry->d_name.len, | 436 | .fromlen = dentry->d_name.len, |
437 | .topath = path->name, | 437 | .pages = &page, |
438 | .tolen = path->len, | 438 | .pathlen = len, |
439 | .sattr = sattr | 439 | .sattr = sattr |
440 | }; | 440 | }; |
441 | struct rpc_message msg = { | 441 | struct rpc_message msg = { |
@@ -444,11 +444,11 @@ nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct qstr *path, | |||
444 | }; | 444 | }; |
445 | int status; | 445 | int status; |
446 | 446 | ||
447 | if (path->len > NFS2_MAXPATHLEN) | 447 | if (len > NFS2_MAXPATHLEN) |
448 | return -ENAMETOOLONG; | 448 | return -ENAMETOOLONG; |
449 | 449 | ||
450 | dprintk("NFS call symlink %s -> %s\n", dentry->d_name.name, | 450 | dprintk("NFS call symlink %s\n", dentry->d_name.name); |
451 | path->name); | 451 | |
452 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); | 452 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); |
453 | nfs_mark_for_revalidate(dir); | 453 | nfs_mark_for_revalidate(dir); |
454 | 454 | ||