summaryrefslogtreecommitdiffstats
path: root/fs/ext4/resize.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2018-11-06 17:18:17 -0500
committerTheodore Ts'o <tytso@mit.edu>2018-11-06 17:18:17 -0500
commit4f32c38b4662312dd3c5f113d8bdd459887fb773 (patch)
tree1462be3323e4f6ddf1d4d805ca1a8a0c00a0aba8 /fs/ext4/resize.c
parentfeaf264ce7f8d54582e2f66eb82dd9dd124c94f3 (diff)
downloadlinux-4f32c38b4662312dd3c5f113d8bdd459887fb773.tar.bz2
ext4: avoid possible double brelse() in add_new_gdb() on error path
Fixes: b40971426a83 ("ext4: add error checking to calls to ...") Reported-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org # 2.6.38
Diffstat (limited to 'fs/ext4/resize.c')
-rw-r--r--fs/ext4/resize.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 85158e9de7c2..a5efee34415f 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -871,6 +871,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
err = ext4_handle_dirty_metadata(handle, NULL, gdb_bh);
if (unlikely(err)) {
ext4_std_error(sb, err);
+ iloc.bh = NULL;
goto exit_inode;
}
brelse(dind);