summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/key.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-01-20 14:32:00 -0800
committerEric Biggers <ebiggers@google.com>2020-01-22 14:49:56 -0800
commitaec992aab890b2dece2c5c95dbd6953aeecd45cb (patch)
treee4886bc5a4b5d1e8f653455f866017ac0d0f637a /fs/ubifs/key.h
parentf0d07a98a070bb5e443df19c3aa55693cbca9341 (diff)
downloadlinux-aec992aab890b2dece2c5c95dbd6953aeecd45cb.tar.bz2
ubifs: allow both hash and disk name to be provided in no-key names
In order to support a new dirhash method that is a secret-keyed hash over the plaintext filenames (which will be used by encrypted+casefolded directories on ext4 and f2fs), fscrypt will be switching to a new no-key name format that always encodes the dirhash in the name. UBIFS isn't happy with this because it has assertions that verify that either the hash or the disk name is provided, not both. Change it to use the disk name if one is provided, even if a hash is available too; else use the hash. Link: https://lore.kernel.org/r/20200120223201.241390-6-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/ubifs/key.h')
-rw-r--r--fs/ubifs/key.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ubifs/key.h b/fs/ubifs/key.h
index afa704ff5ca0..8142d9d6fe5d 100644
--- a/fs/ubifs/key.h
+++ b/fs/ubifs/key.h
@@ -150,7 +150,6 @@ static inline void dent_key_init(const struct ubifs_info *c,
uint32_t hash = c->key_hash(fname_name(nm), fname_len(nm));
ubifs_assert(c, !(hash & ~UBIFS_S_KEY_HASH_MASK));
- ubifs_assert(c, !nm->hash && !nm->minor_hash);
key->u32[0] = inum;
key->u32[1] = hash | (UBIFS_DENT_KEY << UBIFS_S_KEY_HASH_BITS);
}