Commit 129245cf authored by Zhang Yi's avatar Zhang Yi Committed by Theodore Ts'o
Browse files

ext4: correct the error handle in ext4_fallocate()



The error out label of file_modified() should be out_inode_lock in
ext4_fallocate().

Fixes: 2890e5e0 ("ext4: move out common parts into ext4_fallocate()")
Reported-by: default avatarBaokun Li <libaokun1@huawei.com>
Signed-off-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarBaokun Li <libaokun1@huawei.com>
Link: https://patch.msgid.link/20250319023557.2785018-1-yi.zhang@huaweicloud.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 896b02d0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4744,7 +4744,7 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)

	ret = file_modified(file);
	if (ret)
		return ret;
		goto out_inode_lock;

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