This is a note to let you know that I've just added the patch titled ext4: unlock on error in ext4_expand_extra_isize() to the 5.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-unlock-on-error-in-ext4_expand_extra_isize.patch and it can be found in the queue-5.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 7f420d64a08c1dcd65b27be82a27cf2bdb2e7847 Mon Sep 17 00:00:00 2001 From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Date: Fri, 13 Dec 2019 21:50:11 +0300 Subject: ext4: unlock on error in ext4_expand_extra_isize() From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> commit 7f420d64a08c1dcd65b27be82a27cf2bdb2e7847 upstream. We need to unlock the xattr before returning on this error path. Cc: stable@xxxxxxxxxx # 4.13 Fixes: c03b45b853f5 ("ext4, project: expand inode extra size if possible") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Link: https://lore.kernel.org/r/20191213185010.6k7yl2tck3wlsdkt@kili.mountain Signed-off-by: Theodore Ts'o <tytso@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ext4/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -6035,7 +6035,7 @@ int ext4_expand_extra_isize(struct inode error = ext4_journal_get_write_access(handle, iloc->bh); if (error) { brelse(iloc->bh); - goto out_stop; + goto out_unlock; } error = __ext4_expand_extra_isize(inode, new_extra_isize, iloc, @@ -6045,8 +6045,8 @@ int ext4_expand_extra_isize(struct inode if (!error) error = rc; +out_unlock: ext4_write_unlock_xattr(inode, &no_expand); -out_stop: ext4_journal_stop(handle); return error; } Patches currently in stable-queue which might be from dan.carpenter@xxxxxxxxxx are queue-5.4/staging-iio-ad9834-add-a-check-for-devm_clk_get.patch queue-5.4/phy-renesas-phy-rcar-gen2-fix-the-array-off-by-one-w.patch queue-5.4/bcache-fix-static-checker-warning-in-bcache_device_f.patch queue-5.4/ext4-unlock-on-error-in-ext4_expand_extra_isize.patch queue-5.4/btrfs-return-error-pointer-from-alloc_test_extent_buffer.patch queue-5.4/drm-mipi-dbi-fix-a-loop-in-debugfs-code.patch queue-5.4/rdma-siw-fix-post_recv-qp-state-locking.patch queue-5.4/staging-wilc1000-potential-corruption-in-wilc_parse_.patch