diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-04 07:40:19 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-04 07:40:19 +0000 |
commit | 33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch) | |
tree | 2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /fs/autofs/symlink.c | |
parent | 216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff) |
Merge with Linux 2.3.32.
Diffstat (limited to 'fs/autofs/symlink.c')
-rw-r--r-- | fs/autofs/symlink.c | 44 |
1 files changed, 7 insertions, 37 deletions
diff --git a/fs/autofs/symlink.c b/fs/autofs/symlink.c index 6ca720527..129d5917f 100644 --- a/fs/autofs/symlink.c +++ b/fs/autofs/symlink.c @@ -10,51 +10,21 @@ * * ------------------------------------------------------------------------- */ -#include <linux/string.h> -#include <linux/sched.h> #include "autofs_i.h" static int autofs_readlink(struct dentry *dentry, char *buffer, int buflen) { - struct autofs_symlink *sl; - int len; - - sl = (struct autofs_symlink *)dentry->d_inode->u.generic_ip; - len = sl->len; - if (len > buflen) len = buflen; - copy_to_user(buffer, sl->data, len); - return len; + char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data; + return vfs_readlink(dentry, buffer, buflen, s); } -static struct dentry * autofs_follow_link(struct dentry *dentry, - struct dentry *base, - unsigned int follow) +static struct dentry *autofs_follow_link(struct dentry *dentry, struct dentry *base, unsigned flags) { - struct autofs_symlink *sl; - - sl = (struct autofs_symlink *)dentry->d_inode->u.generic_ip; - return lookup_dentry(sl->data, base, follow); + char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data; + return vfs_follow_link(dentry, base, flags, s); } struct inode_operations autofs_symlink_inode_operations = { - NULL, /* file operations */ - NULL, /* create */ - NULL, /* lookup */ - NULL, /* link */ - NULL, /* unlink */ - NULL, /* symlink */ - NULL, /* mkdir */ - NULL, /* rmdir */ - NULL, /* mknod */ - NULL, /* rename */ - autofs_readlink, /* readlink */ - autofs_follow_link, /* follow_link */ - NULL, /* get_block */ - NULL, /* readpage */ - NULL, /* writepage */ - NULL, /* flushpage */ - NULL, /* truncate */ - NULL, /* permission */ - NULL, /* smap */ - NULL /* revalidate */ + readlink: autofs_readlink, + follow_link: autofs_follow_link }; |