patch-2.4.13 linux/drivers/md/md.c

Next file: linux/drivers/md/raid1.c
Previous file: linux/drivers/md/lvm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.12/linux/drivers/md/md.c linux/drivers/md/md.c
@@ -542,8 +542,10 @@
 		goto abort;
 	}
 
-	if (calc_sb_csum(sb) != sb->sb_csum)
+	if (calc_sb_csum(sb) != sb->sb_csum) {
 		printk(BAD_CSUM, partition_name(rdev->dev));
+		goto abort;
+	}
 	ret = 0;
 abort:
 	return ret;
@@ -2609,7 +2611,7 @@
 				goto abort;
 			}
 			err = md_put_user(md_hd_struct[minor].nr_sects,
-						(long *) arg);
+						(unsigned long *) arg);
 			goto done;
 
 		case BLKGETSIZE64:	/* Return device size */

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