diff options
author | suzuki <suzuki@in.ibm.com> | 2007-03-16 17:38:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-16 22:25:05 -0400 |
commit | b74a2f0913694556a027795d2954d30523fac4c5 (patch) | |
tree | c99e002949bc22db27efa4e635e1bbbf7138d1df /fs/partitions/check.c | |
parent | b257bc051f06607beb3004d9a1c297085e728bec (diff) |
[PATCH] fix rescan_partitions to return errors properly
The only error code which comes from the partition checkers is -1, when
they finds an EIO. As per the discussion, ENOMEM values were ignored,
as they might scare the users.
So, with the current code, we end up returning -1 and not EIO for the
ioctl() calls. Which doesn't give any clue to the user of what went
wrong.
Signed-off-by: Suzuki K P <suzuki@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/partitions/check.c')
-rw-r--r-- | fs/partitions/check.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index e46d237b10f9..8a7d0035ad7a 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -541,7 +541,7 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev) | |||
541 | if (!get_capacity(disk) || !(state = check_partition(disk, bdev))) | 541 | if (!get_capacity(disk) || !(state = check_partition(disk, bdev))) |
542 | return 0; | 542 | return 0; |
543 | if (IS_ERR(state)) /* I/O error reading the partition table */ | 543 | if (IS_ERR(state)) /* I/O error reading the partition table */ |
544 | return PTR_ERR(state); | 544 | return -EIO; |
545 | for (p = 1; p < state->limit; p++) { | 545 | for (p = 1; p < state->limit; p++) { |
546 | sector_t size = state->parts[p].size; | 546 | sector_t size = state->parts[p].size; |
547 | sector_t from = state->parts[p].from; | 547 | sector_t from = state->parts[p].from; |