]> git.hungrycats.org Git - linux/commit
[PATCH] ext3_orphan_del may double-decrement bh->b_count
authorAndrew Morton <akpm@osdl.org>
Thu, 3 Jun 2004 01:04:25 +0000 (18:04 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 01:04:25 +0000 (18:04 -0700)
commit43a492884e469dd7ff11466ad2f675bbfaf7d3ae
tree2ea3314143a65c8b8c9b335bd45700b9a6711fa7
parent86d279de26c3a85199918b8121b49f5f9b67ea6c
[PATCH] ext3_orphan_del may double-decrement bh->b_count

From: Jeff Mahoney <jeffm@suse.com>

Chris Mason and I ran across this one while hunting down another bug.

If ext3_mark_iloc_dirty() fails in ext3_orphan_del() on the outer buffer,
bh->b_count will be decremented twice.  ext3_mark_iloc_dirty() will brelse
the buffer, even on error.  ext3_orphan_del() is explicity brelse'ing the
buffer on error.  Prior to calling ext3_mark_iloc_dirty(), this is the
correct behavior.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/ext3/namei.c