From: Alex Tomas <bzzz@tmi.comex.ru>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: ext2-devel@lists.sourceforge.net, Andrew Morton <akpm@digeo.com>,
Alex Tomas <bzzz@tmi.comex.ru>
Subject: [PATCH] minor bugfix agains ext2
Date: 12 Mar 2003 18:57:26 +0300 [thread overview]
Message-ID: <m3hea84ly1.fsf@lexa.home.net> (raw)
Hi!
looks like following code in 2.5.64 has bug:
for (bit = 0; !group_alloc &&
bit < sbi->s_groups_count; bit++) {
group_no++;
if (group_no >= sbi->s_groups_count)
group_no = 0;
desc = ext2_get_group_desc(sb, group_no, &gdp_bh);
if (!desc)
goto io_error;
group_alloc = group_reserve_blocks(desc, gdp_bh, es_alloc);
}
if (bit >= sbi->s_groups_count) {
*err = -ENOSPC;
goto out_release;
}
if group_reserve_blocks() finds free blocks on last repeat then if (bit >= ...)
will be true, and ext2_new_block() will return -ENOSPC.
here is the patch:
--- linux/fs/ext2/balloc.c Thu Feb 20 16:18:53 2003
+++ balloc.c Wed Mar 12 18:47:21 2003
@@ -395,7 +395,7 @@
goto io_error;
group_alloc = group_reserve_blocks(desc, gdp_bh, es_alloc);
}
- if (bit >= sbi->s_groups_count) {
+ if (!group_alloc) {
*err = -ENOSPC;
goto out_release;
}
reply other threads:[~2003-03-12 15:54 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=m3hea84ly1.fsf@lexa.home.net \
--to=bzzz@tmi.comex.ru \
--cc=akpm@digeo.com \
--cc=ext2-devel@lists.sourceforge.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