diff options
author | Theodore Ts'o <tytso@mit.edu> | 2015-05-18 13:20:47 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-05-18 13:20:47 -0400 |
commit | 1aaa6e8b24114757a836ae0e62d2096deb76f274 (patch) | |
tree | 3f9e93f18c1c1d7ce9e66f844efed706755d0281 /fs/ext4/crypto_key.c | |
parent | 8ee0371470038371729a39ee6669a2132ac47649 (diff) |
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) | |||
152 | memcpy(crypt_info->ci_master_key, ctx.master_key_descriptor, | 152 | memcpy(crypt_info->ci_master_key, ctx.master_key_descriptor, |
153 | sizeof(crypt_info->ci_master_key)); | 153 | sizeof(crypt_info->ci_master_key)); |
154 | if (S_ISREG(inode->i_mode)) | 154 | if (S_ISREG(inode->i_mode)) |
155 | crypt_info->ci_mode = ctx.contents_encryption_mode; | 155 | crypt_info->ci_size = |
156 | ext4_encryption_key_size(crypt_info->ci_data_mode); | ||
156 | else if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) | 157 | else if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) |
157 | crypt_info->ci_mode = ctx.filenames_encryption_mode; | 158 | crypt_info->ci_size = |
158 | else { | 159 | ext4_encryption_key_size(crypt_info->ci_filename_mode); |
159 | printk(KERN_ERR "ext4 crypto: Unsupported inode type.\n"); | 160 | else |
160 | BUG(); | 161 | BUG(); |
161 | } | ||
162 | crypt_info->ci_size = ext4_encryption_key_size(crypt_info->ci_mode); | ||
163 | BUG_ON(!crypt_info->ci_size); | 162 | BUG_ON(!crypt_info->ci_size); |
164 | if (DUMMY_ENCRYPTION_ENABLED(sbi)) { | 163 | if (DUMMY_ENCRYPTION_ENABLED(sbi)) { |
165 | memset(crypt_info->ci_raw, 0x42, EXT4_AES_256_XTS_KEY_SIZE); | 164 | memset(crypt_info->ci_raw, 0x42, EXT4_AES_256_XTS_KEY_SIZE); |