diff options
author | Christoph Hellwig <hch@lst.de> | 2023-12-20 09:35:01 +0300 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2023-12-29 11:07:05 +0300 |
commit | 414147225400a0c4562ebfb0fdd40f065099ede4 (patch) | |
tree | b826699fcb76159b0313047adeeadb9c790bcd50 /fs/xfs/scrub/inode_repair.c | |
parent | 1fb4b0def7b5a5bf91ad62a112d8d3f6dc76585f (diff) | |
download | linux-414147225400a0c4562ebfb0fdd40f065099ede4.tar.xz |
xfs: remove struct xfs_attr_shortform
sparse complains about struct xfs_attr_shortform because it embeds a
structure with a variable sized array in a variable sized array.
Given that xfs_attr_shortform is not a very useful structure, and the
dir2 equivalent has been removed a long time ago, remove it as well.
Provide a xfs_attr_sf_firstentry helper that returns the first
xfs_attr_sf_entry behind a xfs_attr_sf_hdr to replace the structure
dereference.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/inode_repair.c')
-rw-r--r-- | fs/xfs/scrub/inode_repair.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/scrub/inode_repair.c b/fs/xfs/scrub/inode_repair.c index 66949cc3d7cc..0ca62d59f84a 100644 --- a/fs/xfs/scrub/inode_repair.c +++ b/fs/xfs/scrub/inode_repair.c @@ -760,7 +760,7 @@ xrep_dinode_check_afork( struct xfs_scrub *sc, struct xfs_dinode *dip) { - struct xfs_attr_shortform *afork_ptr; + struct xfs_attr_sf_hdr *afork_ptr; size_t attr_size; unsigned int afork_size; @@ -778,7 +778,7 @@ xrep_dinode_check_afork( return true; /* xattr structure cannot be larger than the fork */ - attr_size = be16_to_cpu(afork_ptr->hdr.totsize); + attr_size = be16_to_cpu(afork_ptr->totsize); if (attr_size > afork_size) return true; |