diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2018-11-03 23:22:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-21 11:19:21 +0300 |
commit | cd18d6e0c11dd36ce1b1d27582ae8314f016e4b0 (patch) | |
tree | b3a89fffadf0489e7d800dd432fe6074c92cc8e5 | |
parent | f7b6459e5144a789ab6365a63da2fca6dfd38c12 (diff) | |
download | linux-cd18d6e0c11dd36ce1b1d27582ae8314f016e4b0.tar.xz |
ext4: add missing brelse() in set_flexbg_block_bitmap()'s error path
commit cea5794122125bf67559906a0762186cf417099c upstream.
Fixes: 33afdcc5402d ("ext4: add a function which sets up group blocks ...")
Cc: stable@kernel.org # 3.3
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/ext4/resize.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index ff0968b98eb1..c2901805fe8f 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -459,16 +459,18 @@ static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle, BUFFER_TRACE(bh, "get_write_access"); err = ext4_journal_get_write_access(handle, bh); - if (err) + if (err) { + brelse(bh); return err; + } ext4_debug("mark block bitmap %#04llx (+%llu/%u)\n", first_cluster, first_cluster - start, count2); ext4_set_bits(bh->b_data, first_cluster - start, count2); err = ext4_handle_dirty_metadata(handle, NULL, bh); + brelse(bh); if (unlikely(err)) return err; - brelse(bh); } return 0; |