On Mon, Aug 17, 2020 at 01:14:16PM +0530, Chandan Babu R wrote: > > > + error = xfs_iext_count_may_overflow(ip, whichfork, > > > + XFS_IEXT_ADD_CNT); > > > > I find the XFS_IEXT_ADD_CNT define very confusing. An explicit 1 passed > > for a counter parameter makes a lot more sense to me. > > The reason to do this was to consolidate the comment descriptions at one > place. For e.g. the comment for XFS_IEXT_DIR_MANIP_CNT (from "[PATCH V2 05/10] > xfs: Check for extent overflow when adding/removing dir entries") is slightly > larger. Using constants (instead of macros) would mean that the same comment > has to be replicated across the 6 locations it is being used. I agree with a constant if we have a complex computed value. But a constant for 1 where it is obvious from the context that one means the number one as in adding a single items is just silly and really hurts when reading the code. > > -- > chandan > > > ---end quoted text---