All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chandan Babu R <chandanrlinux@gmail.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: fix xfs_reflink_unshare usage of filemap_write_and_wait_range
Date: Thu, 29 Apr 2021 12:58:20 +0530	[thread overview]
Message-ID: <87k0ola6sr.fsf@garuda> (raw)
In-Reply-To: <20210429054416.GJ1251862@magnolia>

On 29 Apr 2021 at 11:14, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> The final parameter of filemap_write_and_wait_range is the end of the
> range to flush, not the length of the range to flush.
>

Looks good to me.

Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>

> Fixes: 46afb0628b86 ("xfs: only flush the unshared range in xfs_reflink_unshare")
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  fs/xfs/xfs_reflink.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
> index 4dd4af6ac2ef..060695d6d56a 100644
> --- a/fs/xfs/xfs_reflink.c
> +++ b/fs/xfs/xfs_reflink.c
> @@ -1522,7 +1522,8 @@ xfs_reflink_unshare(
>  	if (error)
>  		goto out;
>  
> -	error = filemap_write_and_wait_range(inode->i_mapping, offset, len);
> +	error = filemap_write_and_wait_range(inode->i_mapping, offset,
> +			offset + len - 1);
>  	if (error)
>  		goto out;
>  


-- 
chandan

  reply	other threads:[~2021-04-29  7:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  5:44 [PATCH] xfs: fix xfs_reflink_unshare usage of filemap_write_and_wait_range Darrick J. Wong
2021-04-29  7:28 ` Chandan Babu R [this message]
2021-04-29 13:49 ` Brian Foster

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=87k0ola6sr.fsf@garuda \
    --to=chandanrlinux@gmail.com \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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.