patch-2.1.123 linux/fs/ext2/symlink.c

Next file: linux/fs/inode.c
Previous file: linux/fs/ext2/super.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.122/linux/fs/ext2/symlink.c linux/fs/ext2/symlink.c
@@ -25,7 +25,7 @@
 #include <linux/stat.h>
 
 static int ext2_readlink (struct dentry *, char *, int);
-static struct dentry *ext2_follow_link(struct dentry *, struct dentry *);
+static struct dentry *ext2_follow_link(struct dentry *, struct dentry *, unsigned int);
 
 /*
  * symlinks can't do much...
@@ -52,7 +52,8 @@
 };
 
 static struct dentry * ext2_follow_link(struct dentry * dentry,
-					struct dentry *base)
+					struct dentry *base,
+					unsigned int follow)
 {
 	struct inode *inode = dentry->d_inode;
 	struct buffer_head * bh = NULL;
@@ -68,7 +69,7 @@
 		link = bh->b_data;
 	}
 	UPDATE_ATIME(inode);
-	base = lookup_dentry(link, base, 1);
+	base = lookup_dentry(link, base, follow);
 	if (bh)
 		brelse(bh);
 	return base;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov