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/nfs3proc.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/nfs3proc.c')
-rw-r--r-- | fs/nfs/nfs3proc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index d85ac427c326..f8688eaa0001 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -544,8 +544,8 @@ nfs3_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) | |||
544 | } | 544 | } |
545 | 545 | ||
546 | static int | 546 | static int |
547 | nfs3_proc_symlink(struct inode *dir, struct dentry *dentry, struct qstr *path, | 547 | nfs3_proc_symlink(struct inode *dir, struct dentry *dentry, struct page *page, |
548 | struct iattr *sattr) | 548 | unsigned int len, struct iattr *sattr) |
549 | { | 549 | { |
550 | struct nfs_fh fhandle; | 550 | struct nfs_fh fhandle; |
551 | struct nfs_fattr fattr, dir_attr; | 551 | struct nfs_fattr fattr, dir_attr; |
@@ -553,8 +553,8 @@ nfs3_proc_symlink(struct inode *dir, struct dentry *dentry, struct qstr *path, | |||
553 | .fromfh = NFS_FH(dir), | 553 | .fromfh = NFS_FH(dir), |
554 | .fromname = dentry->d_name.name, | 554 | .fromname = dentry->d_name.name, |
555 | .fromlen = dentry->d_name.len, | 555 | .fromlen = dentry->d_name.len, |
556 | .topath = path->name, | 556 | .pages = &page, |
557 | .tolen = path->len, | 557 | .pathlen = len, |
558 | .sattr = sattr | 558 | .sattr = sattr |
559 | }; | 559 | }; |
560 | struct nfs3_diropres res = { | 560 | struct nfs3_diropres res = { |
@@ -569,11 +569,11 @@ nfs3_proc_symlink(struct inode *dir, struct dentry *dentry, struct qstr *path, | |||
569 | }; | 569 | }; |
570 | int status; | 570 | int status; |
571 | 571 | ||
572 | if (path->len > NFS3_MAXPATHLEN) | 572 | if (len > NFS3_MAXPATHLEN) |
573 | return -ENAMETOOLONG; | 573 | return -ENAMETOOLONG; |
574 | 574 | ||
575 | dprintk("NFS call symlink %s -> %s\n", dentry->d_name.name, | 575 | dprintk("NFS call symlink %s\n", dentry->d_name.name); |
576 | path->name); | 576 | |
577 | nfs_fattr_init(&dir_attr); | 577 | nfs_fattr_init(&dir_attr); |
578 | nfs_fattr_init(&fattr); | 578 | nfs_fattr_init(&fattr); |
579 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); | 579 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); |