From: Martin Pool <mbp@sourcefrog.net>
To: linux-kernel@vger.kernel.org
Subject: [patch] lost error code in rescan_partitions
Date: Tue, 27 Jul 2004 12:14:43 -0700 [thread overview]
Message-ID: <20040727191443.GA9564@happy.site> (raw)
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
reply other threads:[~2004-07-27 19:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040727191443.GA9564@happy.site \
--to=mbp@sourcefrog.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox