ipl/ext2: Fix block calculation and close file handle

I missed one block offset calculation in ext3_extent_load_find().
In addition, close the ext2 file handle in ext2_close() when finished.

Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/ipl/ext2.c b/ipl/ext2.c
index d05ec6c..81ebcac 100644
--- a/ipl/ext2.c
+++ b/ipl/ext2.c
@@ -44,7 +44,7 @@
 static int cached_diblkno = -1;
 static char diblkbuf[EXT2_MAX_BLOCK_SIZE];
 static long dev = -1;
-static long partition_offset;
+static __u64 partition_offset;
 
 struct ext2_inode *fd2inode[MAX_FD];
 
@@ -389,7 +389,7 @@
 		   * EXT2_INODE_SIZE(&sb));
 #ifdef DEBUG
 	printf("ext2_iget: reading %ld bytes at offset %lld "
-	       "(%ld + (%d * %d) + ((%d) %% %d) * %d) "
+	       "(%lld + (%d * %d) + ((%d) %% %d) * %d) "
 	       "(inode %d -> table %d)\n", 
 	       sizeof(struct ext2_inode), offset, partition_offset,
 	       ext2_gds(group)->bg_inode_table, ext2_blocksize,
@@ -519,7 +519,7 @@
 			printf("load extent tree[%d] block at %d\n", d, leaf);
 
 		if (cons_read(dev, hdr, EXT2_MAX_BLOCK_SIZE,
-			      leaf * ext2_blocksize) !=
+			      mul_blocksize(leaf, ext2_blocksize)) !=
 		    EXT2_MAX_BLOCK_SIZE) {
 			printf("ext3_extent_load_find: read error\n");
 			return -1;
@@ -1035,4 +1035,6 @@
 	/* blah, hack, don't close the root inode ever */
 	if (&inode_table[fd].inode != root_inode)
 		ext2_iput(&inode_table[fd].inode);
+
+	fileio_close(fd);
 }