patch-2.1.43 linux/fs/autofs/symlink.c

Next file: linux/fs/binfmt_aout.c
Previous file: linux/fs/autofs/root.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.42/linux/fs/autofs/symlink.c linux/fs/autofs/symlink.c
@@ -14,39 +14,6 @@
 #include <linux/sched.h>
 #include "autofs_i.h"
 
-static int autofs_follow_link(struct inode *dir, struct inode *inode,
-			      int flag, int mode, struct inode **res_inode)
-{
-	int error;
-	char *link;
-
-	*res_inode = NULL;
-	if (!dir) {
-		dir = current->fs->root;
-		dir->i_count++;
-	}
-	if (!inode) {
-		iput(dir);
-		return -ENOENT;
-	}
-	if (!S_ISLNK(inode->i_mode)) {
-		iput(dir);
-		*res_inode = inode;
-		return 0;
-	}
-	if (current->link_count > 5) {
-		iput(dir);
-		iput(inode);
-		return -ELOOP;
-	}
-	link = ((struct autofs_symlink *)inode->u.generic_ip)->data;
-	current->link_count++;
-	error = open_namei(link,flag,mode,res_inode,dir);
-	current->link_count--;
-	iput(inode);
-	return error;
-}
-
 static int autofs_readlink(struct inode *inode, char *buffer, int buflen)
 {
 	struct autofs_symlink *sl;
@@ -76,7 +43,6 @@
 	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