]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: factor xfs_da3_blkinfo verification into common helper
authorBrian Foster <bfoster@redhat.com>
Mon, 6 May 2019 22:00:28 +0000 (18:00 -0400)
committerEric Sandeen <sandeen@redhat.com>
Mon, 6 May 2019 22:00:28 +0000 (18:00 -0400)
commit6b27f70a78d592866bc7a23674e959641b3e2cb6
treef53d0d266f7459deb599dbf213a6a41cff8b93b8
parent68dbe77fb2b6f69ac342d2c9618f7ec3ca5f4451
xfs: factor xfs_da3_blkinfo verification into common helper

Source kernel commit: 8764f98351fa561296f70c3435a5cb1eb6272c39

With the verifier magic value helper in place, we've left a bit more
duplicate code across the verifiers that involve struct
xfs_da3_blkinfo. This includes the da node, xattr leaf and dir leaf
verifiers, all of which perform similar checks for v4 and v5
filesystems.

Create a common helper to verify an xfs_da3_blkinfo structure,
taking care to only access v5 fields where appropriate, and refactor
the aforementioned verifiers to use the helper. No functional
changes.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_attr_leaf.c
libxfs/xfs_da_btree.c
libxfs/xfs_da_format.h
libxfs/xfs_dir2_leaf.c