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/dir.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/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index b483e5d206cb..51328ae640dd 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -1464,10 +1464,6 @@ static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *sym | |||
1464 | char *kaddr; | 1464 | char *kaddr; |
1465 | struct iattr attr; | 1465 | struct iattr attr; |
1466 | unsigned int pathlen = strlen(symname); | 1466 | unsigned int pathlen = strlen(symname); |
1467 | struct qstr qsymname = { | ||
1468 | .name = symname, | ||
1469 | .len = pathlen, | ||
1470 | }; | ||
1471 | int error; | 1467 | int error; |
1472 | 1468 | ||
1473 | dfprintk(VFS, "NFS: symlink(%s/%ld, %s, %s)\n", dir->i_sb->s_id, | 1469 | dfprintk(VFS, "NFS: symlink(%s/%ld, %s, %s)\n", dir->i_sb->s_id, |
@@ -1493,10 +1489,8 @@ static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *sym | |||
1493 | memset(kaddr + pathlen, 0, PAGE_SIZE - pathlen); | 1489 | memset(kaddr + pathlen, 0, PAGE_SIZE - pathlen); |
1494 | kunmap_atomic(kaddr, KM_USER0); | 1490 | kunmap_atomic(kaddr, KM_USER0); |
1495 | 1491 | ||
1496 | /* XXX: eventually this will pass in {page, pathlen}, | ||
1497 | * instead of qsymname; need XDR changes for that */ | ||
1498 | nfs_begin_data_update(dir); | 1492 | nfs_begin_data_update(dir); |
1499 | error = NFS_PROTO(dir)->symlink(dir, dentry, &qsymname, &attr); | 1493 | error = NFS_PROTO(dir)->symlink(dir, dentry, page, pathlen, &attr); |
1500 | nfs_end_data_update(dir); | 1494 | nfs_end_data_update(dir); |
1501 | if (error != 0) { | 1495 | if (error != 0) { |
1502 | dfprintk(VFS, "NFS: symlink(%s/%ld, %s, %s) error %d\n", | 1496 | dfprintk(VFS, "NFS: symlink(%s/%ld, %s, %s) error %d\n", |