]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: replace do_mod with native operations
authorDave Chinner <dchinner@redhat.com>
Fri, 8 Jun 2018 16:54:22 +0000 (09:54 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 8 Jun 2018 17:07:52 +0000 (10:07 -0700)
commit10cb5494abfdb0e48d1dc5368294bfe76ec9c723
treef52e7880cb8e77ef601a5937b1586271e2389b9b
parent80f15714f1fce51975af465cbd722788c3d61212
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>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_iomap.h
fs/xfs/xfs_linux.h
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_rtalloc.c