From: Allison Henderson <allison.henderson@oracle.com>
To: Brian Foster <bfoster@redhat.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: add missing error check in xfs_prepare_shift()
Date: Fri, 26 Apr 2019 16:39:24 -0700 [thread overview]
Message-ID: <767fe955-e286-eeaa-e09a-e68122447742@oracle.com> (raw)
In-Reply-To: <20190426120633.36420-1-bfoster@redhat.com>
Looks ok to me. You can add my review:
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
On 4/26/19 5:06 AM, Brian Foster wrote:
> xfs_prepare_shift() fails to check the error return from
> xfs_flush_unmap_range(). If the latter fails, that could lead to an
> insert/collapse range operation over a delalloc range, which is not
> supported.
>
> Add an error check and return appropriately. This is reproduced
> rarely by generic/475.
>
> Signed-off-by: Brian Foster <bfoster@redhat.com>
> ---
> fs/xfs/xfs_bmap_util.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
> index 2db43ff4f8b5..06d07f1e310b 100644
> --- a/fs/xfs/xfs_bmap_util.c
> +++ b/fs/xfs/xfs_bmap_util.c
> @@ -1193,6 +1193,8 @@ xfs_prepare_shift(
> * about to shift down every extent from offset to EOF.
> */
> error = xfs_flush_unmap_range(ip, offset, XFS_ISIZE(ip));
> + if (error)
> + return error;
>
> /*
> * Clean out anything hanging around in the cow fork now that
>
next prev parent reply other threads:[~2019-04-26 23:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 12:06 [PATCH] xfs: add missing error check in xfs_prepare_shift() Brian Foster
2019-04-26 14:30 ` Darrick J. Wong
2019-04-26 23:39 ` Allison Henderson [this message]
2019-04-28 22:41 ` Dave Chinner
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=767fe955-e286-eeaa-e09a-e68122447742@oracle.com \
--to=allison.henderson@oracle.com \
--cc=bfoster@redhat.com \
--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.