aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_sb.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2019-09-23 16:53:37 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-09-24 08:00:36 -0700
commit6f4ff81a4602dcfba436c6e2307d61ce9e9f652c (patch)
tree821ee19104ed2032452bc7c0222509b8e8d971f3 /fs/xfs/libxfs/xfs_sb.c
parentxfs: revert 1baa2800e62d ("xfs: remove the unused XFS_ALLOC_USERDATA flag") (diff)
downloadlinux-dev-6f4ff81a4602dcfba436c6e2307d61ce9e9f652c.tar.xz
linux-dev-6f4ff81a4602dcfba436c6e2307d61ce9e9f652c.zip
xfs: log proper length of superblock
xfs_trans_log_buf takes first byte, last byte as args. In this case, it should be from 0 to sizeof() - 1. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_sb.c')
-rw-r--r--fs/xfs/libxfs/xfs_sb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
index a08dd8f40346..ac6cdca63e15 100644
--- a/fs/xfs/libxfs/xfs_sb.c
+++ b/fs/xfs/libxfs/xfs_sb.c
@@ -928,7 +928,7 @@ xfs_log_sb(
xfs_sb_to_disk(XFS_BUF_TO_SBP(bp), &mp->m_sb);
xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SB_BUF);
- xfs_trans_log_buf(tp, bp, 0, sizeof(struct xfs_dsb));
+ xfs_trans_log_buf(tp, bp, 0, sizeof(struct xfs_dsb) - 1);
}
/*