This is a note to let you know that I've just added the patch titled ext4: add missing brelse() add_new_gdb_meta_bg()'s error path to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ext4-add-missing-brelse-add_new_gdb_meta_bg-s-error-path.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 61a9c11e5e7a0dab5381afa5d9d4dd5ebf18f7a0 Mon Sep 17 00:00:00 2001 From: Vasily Averin <vvs@xxxxxxxxxxxxx> Date: Sat, 3 Nov 2018 16:50:08 -0400 Subject: ext4: add missing brelse() add_new_gdb_meta_bg()'s error path From: Vasily Averin <vvs@xxxxxxxxxxxxx> commit 61a9c11e5e7a0dab5381afa5d9d4dd5ebf18f7a0 upstream. Fixes: 01f795f9e0d6 ("ext4: add online resizing support for meta_bg ...") Signed-off-by: Vasily Averin <vvs@xxxxxxxxxxxxx> Signed-off-by: Theodore Ts'o <tytso@xxxxxxx> Cc: stable@xxxxxxxxxx # 3.7 Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ext4/resize.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -899,6 +899,7 @@ static int add_new_gdb_meta_bg(struct su 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); @@ -914,8 +915,6 @@ static int add_new_gdb_meta_bg(struct su 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; } Patches currently in stable-queue which might be from vvs@xxxxxxxxxxxxx are queue-4.4/ext4-add-missing-brelse-add_new_gdb_meta_bg-s-error-path.patch queue-4.4/ext4-avoid-buffer-leak-in-ext4_orphan_add-after-prior-errors.patch queue-4.4/ext4-release-bs.bh-before-re-using-in-ext4_xattr_block_find.patch queue-4.4/ext4-fix-missing-cleanup-if-ext4_alloc_flex_bg_array-fails-while-resizing.patch queue-4.4/ext4-fix-buffer-leak-in-__ext4_read_dirblock-on-error-path.patch queue-4.4/ext4-fix-possible-inode-leak-in-the-retry-loop-of-ext4_resize_fs.patch queue-4.4/ext4-fix-possible-leak-of-sbi-s_group_desc_leak-in-error-path.patch queue-4.4/ext4-add-missing-brelse-in-set_flexbg_block_bitmap-s-error-path.patch queue-4.4/ext4-fix-buffer-leak-in-ext4_xattr_move_to_block-on-error-path.patch queue-4.4/ext4-avoid-potential-extra-brelse-in-setup_new_flex_group_blocks.patch queue-4.4/ext4-add-missing-brelse-update_backups-s-error-path.patch queue-4.4/ext4-avoid-possible-double-brelse-in-add_new_gdb-on-error-path.patch