On Tue, Feb 18, 2020 at 01:06:18PM +1100, Dave Chinner wrote: > If we are cleaning up this code, I'd prefer that the retval vs flags > order was made consistent. i.e. > > if (retval == -ENOATTR && (args->flags & ATTR_REPLACE)) > return retval; > if (retval == -EEXIST) { > if (args->flags & ATTR_CREATE) > return retval; > ..... > > Because then it is clear we are stacking error conditions that are > only relevant to specific operations. Ok.