aboutsummaryrefslogtreecommitdiffstats
path: root/fs/crypto/fname.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/crypto/fname.c')
-rw-r--r--fs/crypto/fname.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c
index d7a0f682ca12..052c137f1e70 100644
--- a/fs/crypto/fname.c
+++ b/fs/crypto/fname.c
@@ -275,13 +275,8 @@ int fscrypt_fname_disk_to_usr(struct inode *inode,
oname->name);
return 0;
}
- if (hash) {
- digested_name.hash = hash;
- digested_name.minor_hash = minor_hash;
- } else {
- digested_name.hash = 0;
- digested_name.minor_hash = 0;
- }
+ digested_name.hash = hash;
+ digested_name.minor_hash = minor_hash;
memcpy(digested_name.digest,
FSCRYPT_FNAME_DIGEST(iname->name, iname->len),
FSCRYPT_FNAME_DIGEST_SIZE);
@@ -354,6 +349,7 @@ int fscrypt_setup_filename(struct inode *dir, const struct qstr *iname,
}
if (!lookup)
return -ENOKEY;
+ fname->is_ciphertext_name = true;
/*
* We don't have the key and we are doing a lookup; decode the