From: Jeff Mahoney 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 --- 25-akpm/fs/ext3/namei.c | 2 -- 1 files changed, 2 deletions(-) diff -puN fs/ext3/namei.c~ext3_orphan_del-may-double-decrement-bh-b_count fs/ext3/namei.c --- 25/fs/ext3/namei.c~ext3_orphan_del-may-double-decrement-bh-b_count Wed Jun 2 15:03:43 2004 +++ 25-akpm/fs/ext3/namei.c Wed Jun 2 15:05:24 2004 @@ -1971,8 +1971,6 @@ int ext3_orphan_del(handle_t *handle, st goto out_brelse; NEXT_ORPHAN(inode) = 0; err = ext3_mark_iloc_dirty(handle, inode, &iloc); - if (err) - goto out_brelse; out_err: ext3_std_error(inode->i_sb, err); _