diff options
| author | Martin Pool <mbp@sourcefrog.net> | 2004-07-28 09:12:34 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-28 09:12:34 -0700 |
| commit | b34fbc4c8fdc91712ffe0ddbef0c7d5dd2571120 (patch) | |
| tree | 8993232f31a3321087994e5986c4ea20ab8c5893 | |
| parent | c303675219d822f405ded6206b4e7353c0631ad9 (diff) | |
[PATCH] lost error code in rescan_partitions
This fixes a path where an error from reloading the partition table could be
lost.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | fs/partitions/check.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index cc37e011f10d..ed308494390c 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -395,7 +395,7 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev) 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 *disk, struct block_device *bdev) #endif } kfree(state); - return res; + return 0; } unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p) |
