diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2018-11-07 11:07:01 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-21 09:19:22 +0100 |
commit | 4648dcb21c94f1427cabbb48c1772dc57c5c4649 (patch) | |
tree | 4f954f8bbc793f862dcde45891ed5aae73070c2e /fs | |
parent | 0f0d1c16ae0f60cb5d8de43a12d5b15238ca8563 (diff) | |
download | linux-stable-4648dcb21c94f1427cabbb48c1772dc57c5c4649.tar.gz linux-stable-4648dcb21c94f1427cabbb48c1772dc57c5c4649.tar.bz2 linux-stable-4648dcb21c94f1427cabbb48c1772dc57c5c4649.zip |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index e66100848bb7..163973bb3066 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -2405,6 +2405,8 @@ retry_inode: 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; |