Skip to content

Commit 45ae932

Browse files
vaverintytso
authored andcommitted
ext4: release bs.bh before re-using in ext4_xattr_block_find()
bs.bh was taken in previous ext4_xattr_block_find() call, it should be released before re-using Fixes: 7e01c8e ("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
1 parent ecaaf40 commit 45ae932

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/ext4/xattr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,6 +2395,8 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
23952395
error = ext4_xattr_block_set(handle, inode, &i, &bs);
23962396
} else if (error == -ENOSPC) {
23972397
if (EXT4_I(inode)->i_file_acl && !bs.s.base) {
2398+
brelse(bs.bh);
2399+
bs.bh = NULL;
23982400
error = ext4_xattr_block_find(inode, &i, &bs);
23992401
if (error)
24002402
goto cleanup;

0 commit comments

Comments
 (0)