patch-2.2.13 linux/fs/isofs/inode.c

Next file: linux/fs/lockd/mon.c
Previous file: linux/fs/ext2/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.12/linux/fs/isofs/inode.c linux/fs/isofs/inode.c
@@ -976,6 +976,7 @@
 	struct buffer_head * bh = NULL;
 	int block = 0;
 	int i = 0;
+	int more_entries = 0;
 	void *cpnt;
 	struct iso_directory_record * raw_inode;
 
@@ -996,7 +997,6 @@
 				goto out_noread;
 		}
 		pnt = ((unsigned char *) bh->b_data + offset);
-		raw_inode = ((struct iso_directory_record *) pnt);
 		/*
 		 * Note: this is invariant even if the record
 		 * spans buffers and must be copied ...
@@ -1008,6 +1008,7 @@
 			ino = (ino & ~(ISOFS_BLOCK_SIZE - 1)) + ISOFS_BLOCK_SIZE;
 			continue;
 		}
+		raw_inode = ((struct iso_directory_record *) pnt);
 
 		/* Check whether the raw inode spans the buffer ... */	
 		if (offset + reclen > bufsize){
@@ -1029,13 +1030,15 @@
 		inode->i_size += isonum_733 (raw_inode->size);
 		if(i == 1) inode->u.isofs_i.i_next_section_ino = ino;
 
+		more_entries = raw_inode->flags[-high_sierra] & 0x80;
+		
 		ino += reclen;
 		if (cpnt)
 			kfree (cpnt);
 		i++;
 		if(i > 100)
 			goto out_toomany;
-	} while(raw_inode->flags[-high_sierra] & 0x80);
+	} while(more_entries);
 out:
 	brelse(bh);
 	return 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)