patch-2.1.44 linux/fs/autofs/symlink.c
Next file: linux/fs/autofs/waitq.c
Previous file: linux/fs/autofs/root.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Mon Jul 7 12:58:01 1997
- Orig file:
v2.1.43/linux/fs/autofs/symlink.c
- Orig date:
Mon Jun 16 16:35:57 1997
diff -u --recursive --new-file v2.1.43/linux/fs/autofs/symlink.c linux/fs/autofs/symlink.c
@@ -19,18 +19,21 @@
struct autofs_symlink *sl;
int len;
- if (!S_ISLNK(inode->i_mode)) {
- iput(inode);
- return -EINVAL;
- }
sl = (struct autofs_symlink *)inode->u.generic_ip;
len = sl->len;
if (len > buflen) len = buflen;
copy_to_user(buffer,sl->data,len);
- iput(inode);
return len;
}
+static struct dentry * autofs_follow_link(struct inode *inode, struct dentry *base)
+{
+ struct autofs_symlink *sl;
+
+ sl = (struct autofs_symlink *)inode->u.generic_ip;
+ return lookup_dentry(sl->data, base, 1);
+}
+
struct inode_operations autofs_symlink_inode_operations = {
NULL, /* file operations */
NULL, /* create */
@@ -43,6 +46,7 @@
NULL, /* mknod */
NULL, /* rename */
autofs_readlink, /* readlink */
+ autofs_follow_link, /* follow_link */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov