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>
此提交包含在:
@@ -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);
|
||||
|
新增問題並參考
封鎖使用者