All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ritesh Harjani <riteshh@linux.ibm.com>
To: Xin Yin <yinxin.x@bytedance.com>
Cc: harshadshirwadkar@gmail.com, tytso@mit.edu,
	adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] ext4: fix incorrect type issue during replay_del_range
Date: Thu, 27 Jan 2022 10:43:37 +0530	[thread overview]
Message-ID: <20220127051337.oc6ibems7mm6bhxp@riteshh-domain> (raw)
In-Reply-To: <20220126063146.2302-1-yinxin.x@bytedance.com>

On 22/01/26 02:31PM, Xin Yin wrote:
> should not use fast commit log data directly, add le32_to_cpu().
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 0b5b5a62b945 ("ext4: use ext4_ext_remove_space() for fast commit replay delete range")
> Signed-off-by: Xin Yin <yinxin.x@bytedance.com>

Yes, a required change indeed.
Since the patch marked as fixes was cc'd to stable, so this might be requird as
well.

Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>

> ---
>  fs/ext4/fast_commit.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
> index ccd2b216d6ba..488347b4c8b0 100644
> --- a/fs/ext4/fast_commit.c
> +++ b/fs/ext4/fast_commit.c
> @@ -1798,8 +1798,9 @@ ext4_fc_replay_del_range(struct super_block *sb, struct ext4_fc_tl *tl,
>  	}
>
>  	down_write(&EXT4_I(inode)->i_data_sem);
> -	ret = ext4_ext_remove_space(inode, lrange.fc_lblk,
> -				lrange.fc_lblk + lrange.fc_len - 1);
> +	ret = ext4_ext_remove_space(inode, le32_to_cpu(lrange.fc_lblk),
> +				le32_to_cpu(lrange.fc_lblk) +
> +				le32_to_cpu(lrange.fc_len) - 1);
>  	up_write(&EXT4_I(inode)->i_data_sem);
>  	if (ret) {
>  		iput(inode);
> --
> 2.25.1
>

  reply	other threads:[~2022-01-27  5:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26  6:31 [PATCH] ext4: fix incorrect type issue during replay_del_range Xin Yin
2022-01-27  5:13 ` Ritesh Harjani [this message]
2022-01-29  4:43 ` 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=20220127051337.oc6ibems7mm6bhxp@riteshh-domain \
    --to=riteshh@linux.ibm.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=harshadshirwadkar@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=tytso@mit.edu \
    --cc=yinxin.x@bytedance.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.