Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b74a2f0913694556a027795d2954d30523fac4c5
Commit:     b74a2f0913694556a027795d2954d30523fac4c5
Parent:     b257bc051f06607beb3004d9a1c297085e728bec
Author:     suzuki <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 16 13:38:25 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Mar 16 19:25:05 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 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 e46d237..8a7d003 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)
        if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
                return 0;
        if (IS_ERR(state))      /* I/O error reading the partition table */
-               return PTR_ERR(state);
+               return -EIO;
        for (p = 1; p < state->limit; p++) {
                sector_t size = state->parts[p].size;
                sector_t from = state->parts[p].from;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to