[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9687c245-57ec-40c5-9d64-58bca09118ee@huawei.com>
Date: Wed, 19 Mar 2025 15:30:31 +0800
From: Baokun Li <libaokun1@...wei.com>
To: Zhang Yi <yi.zhang@...weicloud.com>, <linux-ext4@...r.kernel.org>
CC: <linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<tytso@....edu>, <adilger.kernel@...ger.ca>, <jack@...e.cz>,
<yi.zhang@...wei.com>, <yukuai3@...wei.com>, <yangerkun@...wei.com>
Subject: Re: [PATCH -next] ext4: correct the error handle in ext4_fallocate()
On 2025/3/19 10:35, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@...wei.com>
>
> The error out label of file_modified() should be out_inode_lock in
> ext4_fallocate().
>
> Fixes: 2890e5e0f49e ("ext4: move out common parts into ext4_fallocate()")
> Reported-by: Baokun Li <libaokun1@...wei.com>
> Signed-off-by: Zhang Yi <yi.zhang@...wei.com>
> ---
Looks good. Feel free to add:
Reviewed-by: Baokun Li <libaokun1@...wei.com>
> fs/ext4/extents.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 1b028be19193..dcc49df190ed 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -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);
Powered by blists - more mailing lists