[PATCH 06/10] xfs: teach xfs_btree_[sl]block_verify_crc to populate verifier context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rather than simply returning true/false, populate the verifier
context as well.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
 fs/xfs/libxfs/xfs_btree.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
index d4728f70fcc3..0b88cb04a719 100644
--- a/fs/xfs/libxfs/xfs_btree.c
+++ b/fs/xfs/libxfs/xfs_btree.c
@@ -297,11 +297,11 @@ xfs_btree_lblock_verify_crc(
 
 	if (xfs_sb_version_hascrc(&mp->m_sb)) {
 		if (!xfs_log_check_lsn(mp, be64_to_cpu(block->bb_u.l.bb_lsn)))
-			return false;
+			return XFS_CORRUPTED_RETURN(vc);
 		return xfs_buf_verify_cksum(vc, bp, XFS_BTREE_LBLOCK_CRC_OFF);
 	}
 
-	return true;
+	return XFS_VERIFIED_RETURN(vc);
 }
 
 /*
@@ -336,11 +336,11 @@ xfs_btree_sblock_verify_crc(
 
 	if (xfs_sb_version_hascrc(&mp->m_sb)) {
 		if (!xfs_log_check_lsn(mp, be64_to_cpu(block->bb_u.s.bb_lsn)))
-			return false;
+			return XFS_CORRUPTED_RETURN(vc);
 		return xfs_buf_verify_cksum(vc, bp, XFS_BTREE_SBLOCK_CRC_OFF);
 	}
 
-	return true;
+	return XFS_VERIFIED_RETURN(vc);
 }
 
 static int
-- 
2.17.0





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux