summaryrefslogtreecommitdiff
path: root/fs/ext4/resize.c
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2018-11-03 16:50:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-21 09:24:11 +0100
commit64176ffd7ffcd22dd748cf800fd3c1df8d18a137 (patch)
treec1c183c70d0e44d2ec741067442edfa1e0240b3c /fs/ext4/resize.c
parentfeddbc0114dfc5f602ac471e400f36d1e9c6a4b6 (diff)
downloadlinux-rt-64176ffd7ffcd22dd748cf800fd3c1df8d18a137.tar.gz
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>
Diffstat (limited to 'fs/ext4/resize.c')
-rw-r--r--fs/ext4/resize.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 46098de7222e..e689438ffb57 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -901,6 +901,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);
@@ -916,8 +917,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;
}