From: "J.A. Magallon" <jamagallon@able.es>
To: Lista Linux-Kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@digeo.com>, hugang <hugang@soulinfo.com>
Subject: [BUG] ext3-orlov for 2.4
Date: Sat, 30 Nov 2002 17:16:18 +0100 [thread overview]
Message-ID: <20021130161618.GK2517@werewolf.able.es> (raw)
HI all...
Tell me if this is correct. GCC-3.2 spits a wrning like this when
building -jam, I did not noticed before:
ialloc.c: In function `ext3_new_inode':
ialloc.c:546: warning: comparison between pointer and integer
ialloc.c:682: warning: label `out' defined but not used
ialloc.c:520: warning: `gdp' might be used uninitialized in this function
Line is question is:
if (gdp == -1)
goto fail;
It comes from the orlov-allocator for ext3.
Looking at the structure of ext3_new_inode:
struct inode * ext3_new_inode (handle_t *handle, struct inode * dir, int mode)
{
...
struct ext3_group_desc * gdp;
repeat:
...
if (gdp == -1)
goto fail;
...
gdp = ext3_get_group_desc (sb, group, &bh2);
...
Thigs to note:
- gdp is used without previous initialization.
- gdp is a pointer and is compared with -1
Should not the structure be:
gdp = ext3_get_group_desc (sb, group, &bh2);
if (!gdp)
goto fail;
Can anybody check 2.5 for this also ?
???
TIA
--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.20-jam0 (gcc 3.2 (Mandrake Linux 9.1 3.2-4mdk))
next reply other threads:[~2002-11-30 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-30 16:16 J.A. Magallon [this message]
2002-11-30 22:13 ` [BUG] ext3-orlov for 2.4 Andrew Morton
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=20021130161618.GK2517@werewolf.able.es \
--to=jamagallon@able.es \
--cc=akpm@digeo.com \
--cc=hugang@soulinfo.com \
--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