Skip to content

Commit 51492e9

Browse files
zhangyi089gregkh
authored andcommitted
ext4: correct the error handle in ext4_fallocate()
[ Upstream commit 129245c ] 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]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 85defb9 commit 51492e9

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
@@ -4745,7 +4745,7 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
47454745

47464746
ret = file_modified(file);
47474747
if (ret)
4748-
return ret;
4748+
goto out_inode_lock;
47494749

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

0 commit comments

Comments
 (0)