* [PATCH] xfs: ensure xfs_errortag_random_default matches XFS_ERRTAG_MAX [not found] <20210309184205.18675-1-hsiangkao.ref@aol.com> @ 2021-03-09 18:42 ` Gao Xiang 2021-03-09 21:28 ` Darrick J. Wong 2021-03-11 13:00 ` Christoph Hellwig 0 siblings, 2 replies; 3+ messages in thread From: Gao Xiang @ 2021-03-09 18:42 UTC (permalink / raw) To: linux-xfs; +Cc: Darrick J. Wong, Gao Xiang 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> --- 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 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: ensure xfs_errortag_random_default matches XFS_ERRTAG_MAX 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 2021-03-11 13:00 ` Christoph Hellwig 1 sibling, 0 replies; 3+ messages in thread From: Darrick J. Wong @ 2021-03-09 21:28 UTC (permalink / raw) To: Gao Xiang; +Cc: linux-xfs, Gao Xiang 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 > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: ensure xfs_errortag_random_default matches XFS_ERRTAG_MAX 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 @ 2021-03-11 13:00 ` Christoph Hellwig 1 sibling, 0 replies; 3+ messages in thread From: Christoph Hellwig @ 2021-03-11 13:00 UTC (permalink / raw) To: Gao Xiang; +Cc: linux-xfs, Darrick J. Wong, Gao Xiang Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-11 13:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
2021-03-11 13:00 ` Christoph Hellwig
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox