patch-2.4.26 linux-2.4.26/drivers/md/raid1.c

Next file: linux-2.4.26/drivers/media/video/Config.in
Previous file: linux-2.4.26/drivers/md/lvm-snap.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/drivers/md/raid1.c linux-2.4.26/drivers/md/raid1.c
@@ -487,6 +487,12 @@
 		goto rb_out;
 	
 
+#if defined(CONFIG_ALPHA) && ((__GNUC__ < 3) || \
+			      ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)))
+	/* Work around a compiler bug in older gcc */
+	new_disk = *(volatile int *)&new_disk;
+#endif
+
 	/* make sure that disk is operational */
 	while( !conf->mirrors[new_disk].operational) {
 		if (new_disk <= 0) new_disk = conf->raid_disks;
@@ -544,6 +550,11 @@
 	
 	/* Find the disk which is closest */
 	
+#if defined(CONFIG_ALPHA) && ((__GNUC__ < 3) || \
+			      ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)))
+	/* Work around a compiler bug in older gcc */
+	disk = *(volatile int *)&disk;
+#endif
 	do {
 		if (disk <= 0)
 			disk = conf->raid_disks;

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