static int dbg_check_name(const struct ubifs_info *c, const struct ubifs_dent_node *dent, const struct qstr *nm) { if (!dbg_is_chk_gen(c)) return 0; if (le16_to_cpu(dent->nlen) != nm->len) return -EINVAL; if (memcmp(dent->name, nm->name, nm->len)) return -EINVAL; return 0; }
static int dbg_check_name(const struct ubifs_info *c, const struct ubifs_dent_node *dent, const struct fscrypt_name *nm) { if (!dbg_is_chk_gen(c)) return 0; if (le16_to_cpu(dent->nlen) != fname_len(nm)) return -EINVAL; if (memcmp(dent->name, fname_name(nm), fname_len(nm))) return -EINVAL; return 0; }