Commit da497e7a authored by Vasily Averin's avatar Vasily Averin Committed by Greg Kroah-Hartman
Browse files

ext4: avoid buffer leak on shutdown in ext4_mark_iloc_dirty()

commit a6758309 upstream.

ext4_mark_iloc_dirty() callers expect that it releases iloc->bh
even if it returns an error.

Fixes: 0db1ff22

 ("ext4: add shutdown bit and check for it")
Signed-off-by: default avatarVasily Averin <>
Signed-off-by: default avatarTheodore Ts'o <>
Cc: # 4.11
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 3caa7b62
...@@ -5671,9 +5671,10 @@ int ext4_mark_iloc_dirty(handle_t *handle, ...@@ -5671,9 +5671,10 @@ int ext4_mark_iloc_dirty(handle_t *handle,
{ {
int err = 0; int err = 0;
if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) {
return -EIO; return -EIO;
if (IS_I_VERSION(inode)) if (IS_I_VERSION(inode))
inode_inc_iversion(inode); inode_inc_iversion(inode);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment