[10/8] xfs: add magic numbers to dquot buffer ops
diff mbox series

Message ID 20190207185652.GH7991@magnolia
State Accepted
Headers show
Series
  • xfs: fix [f]inobt magic value verification
Related show

Commit Message

Darrick J. Wong Feb. 7, 2019, 6:56 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Add dquot magic numbers to the buffer ops type, in case we ever want to
use them.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/xfs/libxfs/xfs_dquot_buf.c |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Brian Foster Feb. 7, 2019, 8:27 p.m. UTC | #1
On Thu, Feb 07, 2019 at 10:56:52AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Add dquot magic numbers to the buffer ops type, in case we ever want to
> use them.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/libxfs/xfs_dquot_buf.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/fs/xfs/libxfs/xfs_dquot_buf.c b/fs/xfs/libxfs/xfs_dquot_buf.c
> index d293f371dd54..b956638a3532 100644
> --- a/fs/xfs/libxfs/xfs_dquot_buf.c
> +++ b/fs/xfs/libxfs/xfs_dquot_buf.c
> @@ -277,6 +277,8 @@ xfs_dquot_buf_write_verify(
>  
>  const struct xfs_buf_ops xfs_dquot_buf_ops = {
>  	.name = "xfs_dquot",
> +	.magic = { cpu_to_be16(XFS_DQUOT_MAGIC),
> +		   cpu_to_be16(XFS_DQUOT_MAGIC) },
>  	.verify_read = xfs_dquot_buf_read_verify,
>  	.verify_write = xfs_dquot_buf_write_verify,
>  	.verify_struct = xfs_dquot_buf_verify_struct,
> @@ -284,6 +286,8 @@ const struct xfs_buf_ops xfs_dquot_buf_ops = {
>  
>  const struct xfs_buf_ops xfs_dquot_buf_ra_ops = {
>  	.name = "xfs_dquot_ra",
> +	.magic = { cpu_to_be16(XFS_DQUOT_MAGIC),
> +		   cpu_to_be16(XFS_DQUOT_MAGIC) },
>  	.verify_read = xfs_dquot_buf_readahead_verify,
>  	.verify_write = xfs_dquot_buf_write_verify,
>  };

Patch
diff mbox series

diff --git a/fs/xfs/libxfs/xfs_dquot_buf.c b/fs/xfs/libxfs/xfs_dquot_buf.c
index d293f371dd54..b956638a3532 100644
--- a/fs/xfs/libxfs/xfs_dquot_buf.c
+++ b/fs/xfs/libxfs/xfs_dquot_buf.c
@@ -277,6 +277,8 @@  xfs_dquot_buf_write_verify(
 
 const struct xfs_buf_ops xfs_dquot_buf_ops = {
 	.name = "xfs_dquot",
+	.magic = { cpu_to_be16(XFS_DQUOT_MAGIC),
+		   cpu_to_be16(XFS_DQUOT_MAGIC) },
 	.verify_read = xfs_dquot_buf_read_verify,
 	.verify_write = xfs_dquot_buf_write_verify,
 	.verify_struct = xfs_dquot_buf_verify_struct,
@@ -284,6 +286,8 @@  const struct xfs_buf_ops xfs_dquot_buf_ops = {
 
 const struct xfs_buf_ops xfs_dquot_buf_ra_ops = {
 	.name = "xfs_dquot_ra",
+	.magic = { cpu_to_be16(XFS_DQUOT_MAGIC),
+		   cpu_to_be16(XFS_DQUOT_MAGIC) },
 	.verify_read = xfs_dquot_buf_readahead_verify,
 	.verify_write = xfs_dquot_buf_write_verify,
 };