public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] lost error code in rescan_partitions
@ 2004-07-27 19:14 Martin Pool
  0 siblings, 0 replies; only message in thread
From: Martin Pool @ 2004-07-27 19:14 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-27 19:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-27 19:14 [patch] lost error code in rescan_partitions Martin Pool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox