mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-09 18:19:06 +00:00
ext4: avoid buffer leak in ext4_orphan_add() after prior errors
commitfeaf264ce7
upstream. Fixes:d745a8c20c
("ext4: reduce contention on s_orphan_lock") Fixes:6e3617e579
("ext4: Handle non empty on-disk orphan link") Cc: Dmitry Monakhov <dmonakhov@gmail.com> Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org # 2.6.34 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d65b7d334f
commit
656b121b39
1 changed files with 3 additions and 1 deletions
|
@ -2811,7 +2811,9 @@ int ext4_orphan_add(handle_t *handle, struct inode *inode)
|
|||
list_del_init(&EXT4_I(inode)->i_orphan);
|
||||
mutex_unlock(&sbi->s_orphan_lock);
|
||||
}
|
||||
}
|
||||
} else
|
||||
brelse(iloc.bh);
|
||||
|
||||
jbd_debug(4, "superblock will point to %lu\n", inode->i_ino);
|
||||
jbd_debug(4, "orphan inode %lu will point to %d\n",
|
||||
inode->i_ino, NEXT_ORPHAN(inode));
|
||||
|
|
Loading…
Reference in a new issue