Skip to content

Commit 7f420d6

Browse files
Dan Carpentertytso
authored andcommitted
ext4: unlock on error in ext4_expand_extra_isize()
We need to unlock the xattr before returning on this error path. Cc: [email protected] # 4.13 Fixes: c03b45b ("ext4, project: expand inode extra size if possible") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 707d1a2 commit 7f420d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ext4/inode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5689,7 +5689,7 @@ int ext4_expand_extra_isize(struct inode *inode,
56895689
error = ext4_journal_get_write_access(handle, iloc->bh);
56905690
if (error) {
56915691
brelse(iloc->bh);
5692-
goto out_stop;
5692+
goto out_unlock;
56935693
}
56945694

56955695
error = __ext4_expand_extra_isize(inode, new_extra_isize, iloc,
@@ -5699,8 +5699,8 @@ int ext4_expand_extra_isize(struct inode *inode,
56995699
if (!error)
57005700
error = rc;
57015701

5702+
out_unlock:
57025703
ext4_write_unlock_xattr(inode, &no_expand);
5703-
out_stop:
57045704
ext4_journal_stop(handle);
57055705
return error;
57065706
}

0 commit comments

Comments
 (0)