public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Gao Xiang <hsiangkao@aol.com>
Cc: linux-xfs@vger.kernel.org, Gao Xiang <hsiangkao@redhat.com>
Subject: Re: [PATCH] xfs: ensure xfs_errortag_random_default matches XFS_ERRTAG_MAX
Date: Tue, 9 Mar 2021 13:28:27 -0800	[thread overview]
Message-ID: <20210309212827.GA3419940@magnolia> (raw)
In-Reply-To: <20210309184205.18675-1-hsiangkao@aol.com>

On Wed, Mar 10, 2021 at 02:42:05AM +0800, Gao Xiang wrote:
> From: Gao Xiang <hsiangkao@redhat.com>
> 
> Add the BUILD_BUG_ON to xfs_errortag_add() in order to make sure that
> the length of xfs_errortag_random_default matches XFS_ERRTAG_MAX when
> building.
> 
> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>

Yay!
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/xfs_error.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
> index 185b4915b7bf..82425c9a623d 100644
> --- a/fs/xfs/xfs_error.c
> +++ b/fs/xfs/xfs_error.c
> @@ -299,6 +299,7 @@ xfs_errortag_add(
>  	struct xfs_mount	*mp,
>  	unsigned int		error_tag)
>  {
> +	BUILD_BUG_ON(ARRAY_SIZE(xfs_errortag_random_default) != XFS_ERRTAG_MAX);
>  	if (error_tag >= XFS_ERRTAG_MAX)
>  		return -EINVAL;
>  
> -- 
> 2.20.1
> 

  reply	other threads:[~2021-03-09 21:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210309184205.18675-1-hsiangkao.ref@aol.com>
2021-03-09 18:42 ` [PATCH] xfs: ensure xfs_errortag_random_default matches XFS_ERRTAG_MAX Gao Xiang
2021-03-09 21:28   ` Darrick J. Wong [this message]
2021-03-11 13:00   ` 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=20210309212827.GA3419940@magnolia \
    --to=djwong@kernel.org \
    --cc=hsiangkao@aol.com \
    --cc=hsiangkao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox