Skip to content

Commit 129245c

Browse files
zhangyi089tytso
authored andcommitted
ext4: correct the error handle in ext4_fallocate()
The error out label of file_modified() should be out_inode_lock in ext4_fallocate(). Fixes: 2890e5e ("ext4: move out common parts into ext4_fallocate()") Reported-by: Baokun Li <[email protected]> Signed-off-by: Zhang Yi <[email protected]> Reviewed-by: Baokun Li <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 896b02d commit 129245c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ext4/extents.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4744,7 +4744,7 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
47444744

47454745
ret = file_modified(file);
47464746
if (ret)
4747-
return ret;
4747+
goto out_inode_lock;
47484748

47494749
if ((mode & FALLOC_FL_MODE_MASK) == FALLOC_FL_ALLOCATE_RANGE) {
47504750
ret = ext4_do_fallocate(file, offset, len, mode);

0 commit comments

Comments
 (0)