From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/3] xfs: check _btree_check_block value
Date: Wed, 19 Jul 2017 09:20:02 -0400 [thread overview]
Message-ID: <20170719132002.GA54534@bfoster.bfoster> (raw)
In-Reply-To: <150040225662.1216.16823172616535217786.stgit@magnolia>
On Tue, Jul 18, 2017 at 11:24:16AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Check the _btree_check_block return value for the firstrec and lastrec
> functions, since we have the ability to signal that the repositioning
> did not succeed.
>
> Fixes-coverity-id: 114067
> Fixes-coverity-id: 114068
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/libxfs/xfs_btree.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>
> diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
> index 4da85ff..e0bcc4a 100644
> --- a/fs/xfs/libxfs/xfs_btree.c
> +++ b/fs/xfs/libxfs/xfs_btree.c
> @@ -728,7 +728,8 @@ xfs_btree_firstrec(
> * Get the block pointer for this level.
> */
> block = xfs_btree_get_block(cur, level, &bp);
> - xfs_btree_check_block(cur, block, level, bp);
> + if (xfs_btree_check_block(cur, block, level, bp))
> + return 0;
> /*
> * It's empty, there is no such record.
> */
> @@ -757,7 +758,8 @@ xfs_btree_lastrec(
> * Get the block pointer for this level.
> */
> block = xfs_btree_get_block(cur, level, &bp);
> - xfs_btree_check_block(cur, block, level, bp);
> + if (xfs_btree_check_block(cur, block, level, bp))
> + return 0;
> /*
> * It's empty, there is no such record.
> */
>
> --
> 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
prev parent reply other threads:[~2017-07-19 13:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 18:24 [PATCH 1/3] xfs: check _btree_check_block value Darrick J. Wong
2017-07-18 18:24 ` [PATCH 2/3] xfs: set firstfsb to NULLFSBLOCK before feeding it to _bmapi_write Darrick J. Wong
2017-07-19 13:20 ` Brian Foster
2017-07-19 15:39 ` Darrick J. Wong
2017-07-19 16:10 ` Brian Foster
2017-07-18 18:24 ` [PATCH 3/3] xfs: check _alloc_read_agf buffer pointer before using Darrick J. Wong
2017-07-19 13:20 ` Brian Foster
2017-07-19 15:48 ` Darrick J. Wong
2017-07-19 13:20 ` Brian Foster [this message]
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=20170719132002.GA54534@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