+ fix-rescan_partitions-to-return-errors-properly.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     fix rescan_partitions to return errors properly
has been added to the -mm tree.  Its filename is
     fix-rescan_partitions-to-return-errors-properly.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: fix rescan_partitions to return errors properly
From: suzuki <suzuki@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/partitions/check.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/partitions/check.c~fix-rescan_partitions-to-return-errors-properly fs/partitions/check.c
--- a/fs/partitions/check.c~fix-rescan_partitions-to-return-errors-properly
+++ a/fs/partitions/check.c
@@ -541,7 +541,7 @@ int rescan_partitions(struct gendisk *di
 	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;
_

Patches currently in -mm which might be from suzuki@xxxxxxxxxx are

check_partition-fix-error-check.patch
fix-rescan_partitions-to-return-errors-properly.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux