From: Martin Pool <mbp@sourcefrog.net>

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

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/partitions/check.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/partitions/check.c~lost-error-code-in-rescan_partitions fs/partitions/check.c
--- 25/fs/partitions/check.c~lost-error-code-in-rescan_partitions	Tue Jul 27 14:28:19 2004
+++ 25-akpm/fs/partitions/check.c	Tue Jul 27 14:28:19 2004
@@ -395,7 +395,7 @@ int rescan_partitions(struct gendisk *di
 	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;
@@ -408,7 +408,7 @@ int rescan_partitions(struct gendisk *di
 #endif
 	}
 	kfree(state);
-	return res;
+	return 0;
 }
 
 unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p)
_