Skip to contentSkip to conversation

lost error code in rescan_partitions

PATCH New Martin Pool 1 participant 1 message Jul 27, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lost error code in rescan_partitions

This patch to 2.6.8 fixes a path where an error from reloading the partition table could be lost.

fs/partitions/check.c +2 -2
Index: linux-2.6/fs/partitions/check.c
===================================================================
@@ -407,7 +407,7 @@
 	if (disk->fops->revalidate_disk)
 		disk->fops->revalidate_disk(disk);
 	if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
-		return res;
+		return -EIO;
 	for (p = 1; p < state->limit; p++) {
 		sector_t size = state->parts[p].size;
 		sector_t from = state->parts[p].from;
@@ -420,7 +420,7 @@
 #endif
 	}
 	kfree(state);
-	return res;
+	return 0;
 }
 
 unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p)
Signature · 1 line
Martin