summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2018-11-07 11:07:01 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-21 09:26:02 +0100
commitb66102a457de28cc58033de0eaaff8f1153621a1 (patch)
tree9377e7641b7629b48aeef6b673a2ef05a894d974 /fs
parent6b436fb67e1fe5f8a1839145e68001492467fca0 (diff)
ext4: release bs.bh before re-using in ext4_xattr_block_find()
commit 45ae932d246f721e6584430017176cbcadfde610 upstream. bs.bh was taken in previous ext4_xattr_block_find() call, it should be released before re-using Fixes: 7e01c8e5420b ("ext3/4: fix uninitialized bs in ...") Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org # 2.6.26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/xattr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 38385bcb9148..9d92f7343585 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1221,6 +1221,8 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
error = ext4_xattr_block_set(handle, inode, &i, &bs);
} else if (error == -ENOSPC) {
if (EXT4_I(inode)->i_file_acl && !bs.s.base) {
+ brelse(bs.bh);
+ bs.bh = NULL;
error = ext4_xattr_block_find(inode, &i, &bs);
if (error)
goto cleanup;