Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3398a400 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong
Browse files

xfs: remove XFS_HSIZE



XFS_HSIZE is an extremly confusing way to calculate the size of handle_t.
Given that handle_t always only had two sizes, and one of them isn't
even covered by XFS_HSIZE to start with just remove the macro and use
a constant sizeof expression.

Note that XFS_HSIZE isn't used in xfsprogs, xfsdump or xfstests either.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarEric Sandeen <sandeen@sandeen.net>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent d4ca1d55
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -446,10 +446,6 @@ typedef struct xfs_handle {
} xfs_handle_t;
#define ha_fsid ha_u._ha_fsid

#define XFS_HSIZE(handle)	(((char *) &(handle).ha_fid.fid_pad	 \
				 - (char *) &(handle))			  \
				 + (handle).ha_fid.fid_len)

/*
 * Structure passed to XFS_IOC_SWAPEXT
 */
+1 −2
Original line number Diff line number Diff line
@@ -120,8 +120,7 @@ xfs_find_handle(
		handle.ha_fid.fid_pad = 0;
		handle.ha_fid.fid_gen = inode->i_generation;
		handle.ha_fid.fid_ino = ip->i_ino;

		hsize = XFS_HSIZE(handle);
		hsize = sizeof(xfs_handle_t);
	}

	error = -EFAULT;