diff options
| -rw-r--r-- | fs/ext4/xattr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 5c9bc0d85cc0..0b9688683526 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
| @@ -2698,7 +2698,6 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize, | |||
| 2698 | struct ext4_inode *raw_inode, handle_t *handle) | 2698 | struct ext4_inode *raw_inode, handle_t *handle) |
| 2699 | { | 2699 | { |
| 2700 | struct ext4_xattr_ibody_header *header; | 2700 | struct ext4_xattr_ibody_header *header; |
| 2701 | struct buffer_head *bh; | ||
| 2702 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); | 2701 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); |
| 2703 | static unsigned int mnt_count; | 2702 | static unsigned int mnt_count; |
| 2704 | size_t min_offs; | 2703 | size_t min_offs; |
| @@ -2739,13 +2738,17 @@ retry: | |||
| 2739 | * EA block can hold new_extra_isize bytes. | 2738 | * EA block can hold new_extra_isize bytes. |
| 2740 | */ | 2739 | */ |
| 2741 | if (EXT4_I(inode)->i_file_acl) { | 2740 | if (EXT4_I(inode)->i_file_acl) { |
| 2741 | struct buffer_head *bh; | ||
| 2742 | |||
| 2742 | bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl); | 2743 | bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl); |
| 2743 | error = -EIO; | 2744 | error = -EIO; |
| 2744 | if (!bh) | 2745 | if (!bh) |
| 2745 | goto cleanup; | 2746 | goto cleanup; |
| 2746 | error = ext4_xattr_check_block(inode, bh); | 2747 | error = ext4_xattr_check_block(inode, bh); |
| 2747 | if (error) | 2748 | if (error) { |
| 2749 | brelse(bh); | ||
| 2748 | goto cleanup; | 2750 | goto cleanup; |
| 2751 | } | ||
| 2749 | base = BHDR(bh); | 2752 | base = BHDR(bh); |
| 2750 | end = bh->b_data + bh->b_size; | 2753 | end = bh->b_data + bh->b_size; |
| 2751 | min_offs = end - base; | 2754 | min_offs = end - base; |
