[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1170363373.4271.44.camel@localhost.localdomain>
Date: Thu, 01 Feb 2007 12:56:13 -0800
From: Mingming Cao <cmm@...ibm.com>
To: Andrew Morton <akpm@...l.org>
Cc: "linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
Andreas Gruenbacher <agruen@...e.de>
Subject: ext3_forget() and ext3_free_blocks()
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
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists