From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/3] xfs: remove unused parameter from xfs_writepage_map
Date: Thu, 30 Nov 2017 08:47:08 -0500 [thread overview]
Message-ID: <20171130134707.GB3516@bfoster.bfoster> (raw)
In-Reply-To: <151189080319.14861.3665951105884303570.stgit@magnolia>
On Tue, Nov 28, 2017 at 09:40:03AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> The first thing that xfs_writepage_map does is clobber the offset
> parameter. Since we never use the passed-in value, turn the parameter
> into a local variable. This gets rid of an UBSAN warning in generic/466.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
I thought Dave might have had a patch that addresses this, but no harm
in fixing it on its own:
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/xfs_aops.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>
> diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
> index b0cccf8..21e2d70 100644
> --- a/fs/xfs/xfs_aops.c
> +++ b/fs/xfs/xfs_aops.c
> @@ -896,13 +896,13 @@ xfs_writepage_map(
> struct writeback_control *wbc,
> struct inode *inode,
> struct page *page,
> - loff_t offset,
> - uint64_t end_offset)
> + uint64_t end_offset)
> {
> LIST_HEAD(submit_list);
> struct xfs_ioend *ioend, *next;
> struct buffer_head *bh, *head;
> ssize_t len = i_blocksize(inode);
> + uint64_t offset;
> int error = 0;
> int count = 0;
> int uptodate = 1;
> @@ -1146,7 +1146,7 @@ xfs_do_writepage(
> end_offset = offset;
> }
>
> - return xfs_writepage_map(wpc, wbc, inode, page, offset, end_offset);
> + return xfs_writepage_map(wpc, wbc, inode, page, end_offset);
>
> redirty:
> redirty_page_for_writepage(wbc, page);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-11-30 13:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 17:39 [PATCH 1/3] xfs: ubsan fixes Darrick J. Wong
2017-11-28 17:40 ` [PATCH 2/3] xfs: remove unused parameter from xfs_writepage_map Darrick J. Wong
2017-11-30 13:47 ` Brian Foster [this message]
2017-11-28 17:40 ` [PATCH 3/3] xfs: scrub inode mode properly Darrick J. Wong
2017-11-30 13:47 ` Brian Foster
2017-11-30 13:47 ` [PATCH 1/3] xfs: ubsan fixes Brian Foster
2017-12-14 16:33 ` Christoph Hellwig
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=20171130134707.GB3516@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=darrick.wong@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).