mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baokun Li <libaokun1@huawei.com>
To: Zhang Yi <yi.zhang@huaweicloud.com>, <linux-ext4@vger.kernel.org>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<tytso@mit.edu>, <adilger.kernel@dilger.ca>, <jack@suse.cz>,
	<yi.zhang@huawei.com>, <yukuai3@huawei.com>,
	<yangerkun@huawei.com>
Subject: Re: [PATCH -next] ext4: correct the error handle in ext4_fallocate()
Date: Wed, 19 Mar 2025 15:30:31 +0800	[thread overview]
Message-ID: <9687c245-57ec-40c5-9d64-58bca09118ee@huawei.com> (raw)
In-Reply-To: <20250319023557.2785018-1-yi.zhang@huaweicloud.com>

On 2025/3/19 10:35, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@huawei.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@huawei.com>
> Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
> ---
Looks good. Feel free to add:

Reviewed-by: Baokun Li <libaokun1@huawei.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);



  reply	other threads:[~2025-03-19  7:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  2:35 Zhang Yi
2025-03-19  7:30 ` Baokun Li [this message]
2025-03-22  3:36 ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9687c245-57ec-40c5-9d64-58bca09118ee@huawei.com \
    --to=libaokun1@huawei.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yi.zhang@huaweicloud.com \
    --cc=yukuai3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®