patch-1.3.91 linux/fs/isofs/rock.c

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

diff -u --recursive --new-file v1.3.90/linux/fs/isofs/rock.c linux/fs/isofs/rock.c
@@ -255,6 +255,7 @@
 			   struct inode * inode){
   int len;
   unsigned char * chr;
+  int symlink_len = 0;
   CONTINUE_DECLS;
 
   if (!inode->i_sb->u.isofs_sb.s_rock) return 0;
@@ -334,7 +335,7 @@
 	 struct SL_component * slp;
 	 slen = rr->len - 5;
 	 slp = &rr->u.SL.link;
-	 inode->i_size = 0;
+	 inode->i_size = symlink_len;
 	 while (slen > 1){
 	   rootflag = 0;
 	   switch(slp->flags &~1){
@@ -359,8 +360,9 @@
 
 	   if(slen < 2) break;
 	   if(!rootflag) inode->i_size += 1;
-	 };
-       };
+	 }
+	}
+	symlink_len = inode->i_size;
 	break;
       case SIG('R','E'):
 	printk("Attempt to read inode for relocated directory\n");
@@ -458,7 +460,6 @@
   
  repeat:
   while (len > 1){ /* There may be one byte for padding somewhere */
-    if (rpnt) break;
     rr = (struct rock_ridge *) chr;
     if (rr->len == 0) goto out; /* Something got screwed up here */
     sig = (chr[0] << 8) + chr[1];

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this