diff options
author | Dave Chinner <dchinner@redhat.com> | 2018-06-08 09:54:22 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-06-08 10:07:52 -0700 |
commit | 0703a8e1c17e2cba742eafe640be3b60f77352c4 (patch) | |
tree | f52e7880cb8e77ef601a5937b1586271e2389b9b /fs/xfs/xfs_inode.c | |
parent | bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a (diff) | |
download | lwn-0703a8e1c17e2cba742eafe640be3b60f77352c4.tar.gz lwn-0703a8e1c17e2cba742eafe640be3b60f77352c4.zip |
xfs: replace do_mod with native operations
do_mod() is a hold-over from when we have different sizes for file
offsets and and other internal values for 40 bit XFS filesystems.
Hence depending on build flags variables passed to do_mod() could
change size. We no longer support those small format filesystems and
hence everything is of fixed size theses days, even on 32 bit
platforms.
As such, we can convert all the do_mod() callers to platform
optimised modulus operations as defined by linux/math64.h.
Individual conversions depend on the types of variables being used.
Signed-Off-By: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 6cda0f08b045..4a2e5e13c569 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -2258,7 +2258,7 @@ xfs_ifree_cluster( */ ioffset = inum - xic->first_ino; if ((xic->alloc & XFS_INOBT_MASK(ioffset)) == 0) { - ASSERT(do_mod(ioffset, inodes_per_cluster) == 0); + ASSERT(ioffset % inodes_per_cluster == 0); continue; } |