Lines Matching refs:fname
413 int lookup, struct fscrypt_name *fname) in fscrypt_setup_filename() argument
418 memset(fname, 0, sizeof(struct fscrypt_name)); in fscrypt_setup_filename()
419 fname->usr_fname = iname; in fscrypt_setup_filename()
422 fname->disk_name.name = (unsigned char *)iname->name; in fscrypt_setup_filename()
423 fname->disk_name.len = iname->len; in fscrypt_setup_filename()
433 &fname->crypto_buf.len)) in fscrypt_setup_filename()
435 fname->crypto_buf.name = kmalloc(fname->crypto_buf.len, in fscrypt_setup_filename()
437 if (!fname->crypto_buf.name) in fscrypt_setup_filename()
440 ret = fscrypt_fname_encrypt(dir, iname, fname->crypto_buf.name, in fscrypt_setup_filename()
441 fname->crypto_buf.len); in fscrypt_setup_filename()
444 fname->disk_name.name = fname->crypto_buf.name; in fscrypt_setup_filename()
445 fname->disk_name.len = fname->crypto_buf.len; in fscrypt_setup_filename()
450 fname->is_nokey_name = true; in fscrypt_setup_filename()
460 fname->crypto_buf.name = kmalloc(FSCRYPT_NOKEY_NAME_MAX, GFP_KERNEL); in fscrypt_setup_filename()
461 if (fname->crypto_buf.name == NULL) in fscrypt_setup_filename()
465 fname->crypto_buf.name); in fscrypt_setup_filename()
472 fname->crypto_buf.len = ret; in fscrypt_setup_filename()
474 nokey_name = (void *)fname->crypto_buf.name; in fscrypt_setup_filename()
475 fname->hash = nokey_name->dirhash[0]; in fscrypt_setup_filename()
476 fname->minor_hash = nokey_name->dirhash[1]; in fscrypt_setup_filename()
479 fname->disk_name.name = nokey_name->bytes; in fscrypt_setup_filename()
480 fname->disk_name.len = in fscrypt_setup_filename()
486 kfree(fname->crypto_buf.name); in fscrypt_setup_filename()
505 bool fscrypt_match_name(const struct fscrypt_name *fname, in fscrypt_match_name() argument
509 (const void *)fname->crypto_buf.name; in fscrypt_match_name()
512 if (likely(fname->disk_name.name)) { in fscrypt_match_name()
513 if (de_name_len != fname->disk_name.len) in fscrypt_match_name()
515 return !memcmp(de_name, fname->disk_name.name, de_name_len); in fscrypt_match_name()