[patch] lost error code in rescan_partitions
From: Martin Pool
Date: Tue Jul 27 2004 - 14:17:41 EST
This patch to 2.6.8 fixes a path where an error from reloading the
partition table could be lost.
Index: linux-2.6/fs/partitions/check.c
===================================================================
--- linux-2.6.orig/fs/partitions/check.c 2004-06-18 15:16:27.000000000 -0700
+++ linux-2.6/fs/partitions/check.c 2004-07-27 12:09:54.437261728 -0700
@@ -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)
--
Martin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/