From: Mingming Cao <cmm@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
Andreas Gruenbacher <agruen@suse.de>
Subject: ext3_forget() and ext3_free_blocks()
Date: Thu, 01 Feb 2007 12:56:13 -0800 [thread overview]
Message-ID: <1170363373.4271.44.camel@localhost.localdomain> (raw)
In-Reply-To: <20070201010836.31a63ef2.akpm@osdl.org>
I am chasing a ext3 bug which double free the same xattr block from two
different inode. While I am looking at the code ext3_xattr_release_block
() I found ext3_free_block() is called before ext3_forget():
ext3_xattr_release_block(handle_t *handle, struct inode *inode,
struct buffer_head *bh)
{
struct mb_cache_entry *ce = NULL;
ce = mb_cache_entry_get(ext3_xattr_cache, bh->b_bdev, bh->b_blocknr);
if (BHDR(bh)->h_refcount == cpu_to_le32(1)) {
ea_bdebug(bh, "refcount now=0; freeing");
if (ce)
mb_cache_entry_free(ce);
ext3_free_blocks(handle, inode, bh->b_blocknr, 1);
get_bh(bh);
ext3_forget(handle, 1, inode, bh, bh->b_blocknr);
} else {
Is this a potential problem? Looks like other places calling
ext3_free_block() it all has ext3_forget() called before that.
Though this seems not related to the double-free bug I see, as I
reversed the order and rerun the test, the bug still reproduced. But
just curious..
Thanks,
Mingming
next prev parent reply other threads:[~2007-02-01 20:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-01 9:08 Fw: [BUG -mm] ext3_orphan_add() accessing corrupted list on a corrupted ext3fs Andrew Morton
2007-02-01 10:25 ` Andreas Dilger
2007-02-01 17:28 ` Alex Tomas
2007-02-02 1:19 ` Andreas Dilger
2007-02-01 16:58 ` Eric Sandeen
2007-02-01 20:56 ` Mingming Cao [this message]
2007-02-02 10:30 ` ext3_forget() and ext3_free_blocks() Andreas Gruenbacher
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=1170363373.4271.44.camel@localhost.localdomain \
--to=cmm@us.ibm.com \
--cc=agruen@suse.de \
--cc=akpm@osdl.org \
--cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).