patch-2.1.36 linux/drivers/block/rd.c

Next file: linux/drivers/block/triton.c
Previous file: linux/drivers/block/ll_rw_blk.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.35/linux/drivers/block/rd.c linux/drivers/block/rd.c
@@ -200,7 +200,7 @@
 {
 	unsigned long i;
 
-	if (--initrd_users) return;
+	if (--initrd_users) return 0;
 	for (i = initrd_start; i < initrd_end; i += PAGE_SIZE)
 		free_page(i);
 	initrd_start = 0;
@@ -405,11 +405,11 @@
 	}
 
 	/* Try ext2 */
-	if (ext2sb->s_magic == EXT2_SUPER_MAGIC) {
+	if (ext2sb->s_magic == cpu_to_le16(EXT2_SUPER_MAGIC)) {
 		printk(KERN_NOTICE
 		       "RAMDISK: Ext2 filesystem found at block %d\n",
 		       start_block);
-		nblocks = ext2sb->s_blocks_count;
+		nblocks = le32_to_cpu(ext2sb->s_blocks_count);
 		goto done;
 	}
 

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