On Fri, 19 Jan 2024 at 12:25, Gabriel Krisman Bertazi <krisman@xxxxxxx> wrote: > > In preparation to call these from libfs, expose dentry_string_cmp in the > header file. Let's not make these header files bigger and more complex. Particularly not for generic_ci_d_compare() to inline it, which makes no sense: generic_ci_d_compare() is so heavy with a big stack frame anyway, that the inlining of this would seem to be just in the noise. And when I look closer, it turns out that __d_lookup_rcu_op_compare() that does this all also does the proper sequence number magic to make the name pointer and the length consistent. So I don't think we need the careful name compare after all, because the caller has fixed the consistency issue. I do also wonder if we should just move the "identical always compares equal" case into __d_lookup_rcu_op_compare(), and not have ->d_compare() have to worry about it at all? Linus