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 on shutdown in ext4_mark_iloc_dirty()
commita6758309a0
upstream. ext4_mark_iloc_dirty() callers expect that it releases iloc->bh even if it returns an error. Fixes:0db1ff222d
("ext4: add shutdown bit and check for it") Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org # 4.11 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
36b1ba6a5e
commit
d65b7d334f
1 changed files with 3 additions and 2 deletions
|
@ -5804,9 +5804,10 @@ int ext4_mark_iloc_dirty(handle_t *handle,
|
|||
{
|
||||
int err = 0;
|
||||
|
||||
if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb))))
|
||||
if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) {
|
||||
put_bh(iloc->bh);
|
||||
return -EIO;
|
||||
|
||||
}
|
||||
if (IS_I_VERSION(inode))
|
||||
inode_inc_iversion(inode);
|
||||
|
||||
|
|
Loading…
Reference in a new issue