[PATCH] xfs: remove the repeated crc verification in xfs_attr3_rmt_verify

xiakaixu1987
2020-09-16T17:49:05Z

From: Kaixu Xia <kaixuxia@tencent.com>

We already do the crc verification before calling the xfs_attr3_rmt_verify()
function, and just return directly for non-crc buffers, so don't need
to do the repeated crc verification in xfs_attr3_rmt_verify().

Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
fs/xfs/libxfs/xfs_attr_remote.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_attr_remote.c b/fs/xfs/libxfs/xfs_attr_remote.c
index 3f80cede7406..48d8e9caf86f 100644
--- a/fs/xfs/libxfs/xfs_attr_remote.c
+++ b/fs/xfs/libxfs/xfs_attr_remote.c
@@ -96,8 +96,6 @@ xfs_attr3_rmt_verify(
{
struct xfs_attr3_rmt_hdr *rmt = ptr;

- if (!xfs_sb_version_hascrc(&mp->m_sb))
- return __this_address;
if (!xfs_verify_magic(bp, rmt->rm_magic))
return __this_address;
if (!uuid_equal(&rmt->rm_uuid, &mp->m_sb.sb_meta_uuid))
--
2.20.0