diff options
author | Theodore Ts'o <tytso@mit.edu> | 2015-05-18 20:20:47 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-05-18 20:20:47 +0300 |
commit | 1aaa6e8b24114757a836ae0e62d2096deb76f274 (patch) | |
tree | 3f9e93f18c1c1d7ce9e66f844efed706755d0281 /fs/ext4/crypto_key.c | |
parent | 8ee0371470038371729a39ee6669a2132ac47649 (diff) | |
download | linux-1aaa6e8b24114757a836ae0e62d2096deb76f274.tar.xz |
ext4 crypto: get rid of ci_mode from struct ext4_crypt_info
The ci_mode field was superfluous, and getting rid of it gets rid of
an unused hole in the structure.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/crypto_key.c')
-rw-r--r-- | fs/ext4/crypto_key.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ext4/crypto_key.c b/fs/ext4/crypto_key.c index d6abe4687cd5..858d7d67a4e1 100644 --- a/fs/ext4/crypto_key.c +++ b/fs/ext4/crypto_key.c @@ -152,14 +152,13 @@ int _ext4_get_encryption_info(struct inode *inode) memcpy(crypt_info->ci_master_key, ctx.master_key_descriptor, sizeof(crypt_info->ci_master_key)); if (S_ISREG(inode->i_mode)) - crypt_info->ci_mode = ctx.contents_encryption_mode; + crypt_info->ci_size = + ext4_encryption_key_size(crypt_info->ci_data_mode); else if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) - crypt_info->ci_mode = ctx.filenames_encryption_mode; - else { - printk(KERN_ERR "ext4 crypto: Unsupported inode type.\n"); + crypt_info->ci_size = + ext4_encryption_key_size(crypt_info->ci_filename_mode); + else BUG(); - } - crypt_info->ci_size = ext4_encryption_key_size(crypt_info->ci_mode); BUG_ON(!crypt_info->ci_size); if (DUMMY_ENCRYPTION_ENABLED(sbi)) { memset(crypt_info->ci_raw, 0x42, EXT4_AES_256_XTS_KEY_SIZE); |