From: Eric Sandeen Date: Fri, 13 Dec 2019 00:54:33 +0000 (-0500) Subject: xfs: log proper length of superblock X-Git-Tag: v5.4.0-rc0~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55b503df9f2b35984ee83288f9bf0808c8eff0d2;p=thirdparty%2Fxfsprogs-dev.git xfs: log proper length of superblock Source kernel commit: 6f4ff81a4602dcfba436c6e2307d61ce9e9f652c 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 Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c index d8a0431ff..583d29aab 100644 --- a/libxfs/xfs_sb.c +++ b/libxfs/xfs_sb.c @@ -905,7 +905,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); } /*