summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_attr.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-12-20 07:34:55 +0100
committerChandan Babu R <chandanbabu@kernel.org>2023-12-29 09:07:03 +0100
commit6e145f943bd86be47e54101fa5939f9ed0cb73e5 (patch)
tree41ed6b10fa716cbf10981949fa1220abd6a3ad57 /fs/xfs/libxfs/xfs_attr.c
parentxfs: fold xfs_rtallocate_extent into xfs_bmap_rtalloc (diff)
downloadlinux-6e145f943bd86be47e54101fa5939f9ed0cb73e5.tar.xz
linux-6e145f943bd86be47e54101fa5939f9ed0cb73e5.zip
xfs: make if_data a void pointer
The xfs_ifork structure currently has a union of the if_root void pointer and the if_data char pointer. In either case it is an opaque pointer that depends on the fork format. Replace the union with a single if_data void pointer as that is what almost all callers want. Only the symlink NULL termination code in xfs_init_local_fork actually needs a new local variable now. 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/libxfs/xfs_attr.c')
-rw-r--r--fs/xfs/libxfs/xfs_attr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index fa49c795f407..7f822e72dfcd 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -1049,9 +1049,8 @@ out_trans_cancel:
static inline int xfs_attr_sf_totsize(struct xfs_inode *dp)
{
- struct xfs_attr_shortform *sf;
+ struct xfs_attr_shortform *sf = dp->i_af.if_data;
- sf = (struct xfs_attr_shortform *)dp->i_af.if_u1.if_data;
return be16_to_cpu(sf->hdr.totsize);
}