On Fri, Jun 08, 2018 at 10:43:57AM +1000, Dave Chinner wrote: > From: Dave Chinner <dchinner@xxxxxxxxxx> > > 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. I have to admit the XFS helpers are much more intuitive. > 7 files changed, 66 insertions(+), 50 deletions(-) And the diffstat agrees with me. I'd rather see the XFS helpers lifted to the kernel on an as-needed basis than making the code bigger and more hairy. -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html