quota: convert macros to inline functions