patch-2.1.45 linux/fs/isofs/dir.c

Next file: linux/fs/isofs/file.c
Previous file: linux/fs/ioctl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.44/linux/fs/isofs/dir.c linux/fs/isofs/dir.c
@@ -54,6 +54,7 @@
 	NULL,			/* mknod */
 	NULL,			/* rename */
 	NULL,			/* readlink */
+	NULL,			/* follow_link */
 	NULL,			/* readpage */
 	NULL,			/* writepage */
 	isofs_bmap,		/* bmap */
@@ -61,20 +62,6 @@
 	NULL			/* permission */
 };
 
-static int parent_inode_number(struct inode * inode, struct iso_directory_record * de)
-{
-	int inode_number = inode->i_ino;
-
-	if ((inode->i_sb->u.isofs_sb.s_firstdatazone) != inode->i_ino)
-		inode_number = inode->u.isofs_i.i_backlink;
-
-	if (inode_number != -1)
-		return inode_number;
-
-	/* This should never happen, but who knows.  Try to be forgiving */
-	return isofs_lookup_grandparent(inode, find_rock_ridge_relocation(de, inode));
-}
-
 static int isofs_name_translate(char * old, int len, char * new)
 {
 	int i, c;
@@ -196,9 +183,7 @@
 
 		/* Handle the case of the '..' directory */
 		if (de->name_len[0] == 1 && de->name[0] == 1) {
-			inode_number = parent_inode_number(inode, de);
-			if (inode_number == -1)
-				break;
+			inode_number = filp->f_dentry->d_parent->d_inode->i_ino;
 			if (filldir(dirent, "..", 2, filp->f_pos, inode_number) < 0)
 				break;
 			filp->f_pos += de_len;

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