summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-12-13 19:50:11 +0100
committerTheodore Ts'o <tytso@mit.edu>2019-12-14 23:31:23 +0100
commit7f420d64a08c1dcd65b27be82a27cf2bdb2e7847 (patch)
tree133f7981561a7ac7148b7d0d904c9d3d78e630a5 /fs
parentext4: optimize __ext4_check_dir_entry() (diff)
downloadlinux-7f420d64a08c1dcd65b27be82a27cf2bdb2e7847.tar.xz
linux-7f420d64a08c1dcd65b27be82a27cf2bdb2e7847.zip
ext4: unlock on error in ext4_expand_extra_isize()
We need to unlock the xattr before returning on this error path. Cc: stable@kernel.org # 4.13 Fixes: c03b45b853f5 ("ext4, project: expand inode extra size if possible") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20191213185010.6k7yl2tck3wlsdkt@kili.mountain Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 310e4abd9aca..16e72621e995 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5689,7 +5689,7 @@ int ext4_expand_extra_isize(struct inode *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,
@@ -5699,8 +5699,8 @@ int ext4_expand_extra_isize(struct inode *inode,
if (!error)
error = rc;
+out_unlock:
ext4_write_unlock_xattr(inode, &no_expand);
-out_stop:
ext4_journal_stop(handle);
return error;
}