diff options
author | Christoph Hellwig <hch@lst.de> | 2017-06-15 00:30:44 -0400 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-06-19 11:59:10 -0400 |
commit | 3398a4005f0c8ced67a9071475562d435d88b7a6 (patch) | |
tree | be6285d43c6169b13e576a7f6ad02d6e6fda54ef /fs/xfs | |
parent | d4ca1d550d052accec85ae26ac5b9d3d8b8f81f1 (diff) |
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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_fs.h | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 3 |
2 files changed, 1 insertions, 6 deletions
diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h index 095bdf049a3f..a9aa13e66046 100644 --- a/fs/xfs/libxfs/xfs_fs.h +++ b/fs/xfs/libxfs/xfs_fs.h | |||
@@ -446,10 +446,6 @@ typedef struct xfs_handle { | |||
446 | } xfs_handle_t; | 446 | } xfs_handle_t; |
447 | #define ha_fsid ha_u._ha_fsid | 447 | #define ha_fsid ha_u._ha_fsid |
448 | 448 | ||
449 | #define XFS_HSIZE(handle) (((char *) &(handle).ha_fid.fid_pad \ | ||
450 | - (char *) &(handle)) \ | ||
451 | + (handle).ha_fid.fid_len) | ||
452 | |||
453 | /* | 449 | /* |
454 | * Structure passed to XFS_IOC_SWAPEXT | 450 | * Structure passed to XFS_IOC_SWAPEXT |
455 | */ | 451 | */ |
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 6190697603c9..f6af76975bc8 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c | |||
@@ -120,8 +120,7 @@ xfs_find_handle( | |||
120 | handle.ha_fid.fid_pad = 0; | 120 | handle.ha_fid.fid_pad = 0; |
121 | handle.ha_fid.fid_gen = inode->i_generation; | 121 | handle.ha_fid.fid_gen = inode->i_generation; |
122 | handle.ha_fid.fid_ino = ip->i_ino; | 122 | handle.ha_fid.fid_ino = ip->i_ino; |
123 | 123 | hsize = sizeof(xfs_handle_t); | |
124 | hsize = XFS_HSIZE(handle); | ||
125 | } | 124 | } |
126 | 125 | ||
127 | error = -EFAULT; | 126 | error = -EFAULT; |