diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2018-11-03 23:50:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-21 11:19:21 +0300 |
commit | 2aa79d317c21e86ec8e312963ccb74bfed28438a (patch) | |
tree | cec292c39110a60ebd23ea83c4e4c247d6777068 | |
parent | cd18d6e0c11dd36ce1b1d27582ae8314f016e4b0 (diff) | |
download | linux-2aa79d317c21e86ec8e312963ccb74bfed28438a.tar.xz |
ext4: add missing brelse() add_new_gdb_meta_bg()'s error path
commit 61a9c11e5e7a0dab5381afa5d9d4dd5ebf18f7a0 upstream.
Fixes: 01f795f9e0d6 ("ext4: add online resizing support for meta_bg ...")
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 3.7
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/ext4/resize.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index c2901805fe8f..e7a637e07c26 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -926,6 +926,7 @@ static int add_new_gdb_meta_bg(struct super_block *sb, sizeof(struct buffer_head *), GFP_NOFS); if (!n_group_desc) { + brelse(gdb_bh); err = -ENOMEM; ext4_warning(sb, "not enough memory for %lu groups", gdb_num + 1); @@ -941,8 +942,6 @@ static int add_new_gdb_meta_bg(struct super_block *sb, kvfree(o_group_desc); BUFFER_TRACE(gdb_bh, "get_write_access"); err = ext4_journal_get_write_access(handle, gdb_bh); - if (unlikely(err)) - brelse(gdb_bh); return err; } |