summaryrefslogtreecommitdiffstats
path: root/fs/nfs/symlink.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
commit46e045034336a2cc90c1798cd7cc07af744ddfd6 (patch)
tree3b9b51fc482e729f663d25333e77fbed9aaa939a /fs/nfs/symlink.c
parent31dc59d503a02e84c4de98826452acaeb56dc15a (diff)
Merge with Linux 2.3.99-pre4.
Diffstat (limited to 'fs/nfs/symlink.c')
-rw-r--r--fs/nfs/symlink.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c
index 9f5a95ff9..6b4a94f44 100644
--- a/fs/nfs/symlink.c
+++ b/fs/nfs/symlink.c
@@ -14,8 +14,9 @@
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/sunrpc/clnt.h>
-#include <linux/nfs_fs.h>
#include <linux/nfs.h>
+#include <linux/nfs2.h>
+#include <linux/nfs_fs.h>
#include <linux/pagemap.h>
#include <linux/stat.h>
#include <linux/mm.h>
@@ -27,16 +28,17 @@
*/
static int nfs_symlink_filler(struct dentry *dentry, struct page *page)
{
- struct nfs_readlinkargs rl_args;
- kmap(page);
+ struct inode *inode = dentry->d_inode;
+ void *buffer = (void *)kmap(page);
+ int error;
+
/* We place the length at the beginning of the page,
* in host byte order, followed by the string. The
* XDR response verification will NULL terminate it.
*/
- rl_args.fh = NFS_FH(dentry);
- rl_args.buffer = (const void *)page_address(page);
- if (rpc_call(NFS_CLIENT(dentry->d_inode), NFSPROC_READLINK,
- &rl_args, NULL, 0) < 0)
+ error = NFS_PROTO(inode)->readlink(dentry, buffer,
+ PAGE_CACHE_SIZE - sizeof(u32)-4);
+ if (error < 0)
goto error;
SetPageUptodate(page);
kunmap(page);
@@ -85,12 +87,10 @@ static int nfs_readlink(struct dentry *dentry, char *buffer, int buflen)
return res;
}
-static struct dentry *
-nfs_follow_link(struct dentry *dentry, struct dentry *base, unsigned int follow)
+static int nfs_follow_link(struct dentry *dentry, struct nameidata *nd)
{
struct page *page = NULL;
- struct dentry *res = vfs_follow_link(dentry, base, follow,
- nfs_getlink(dentry, &page));
+ int res = vfs_follow_link(nd, nfs_getlink(dentry,&page));
if (page) {
kunmap(page);
page_cache_release(page);