f2fs crypto: get rid of ci_mode from struct f2fs_crypt_info

This patch integrates the below patch into f2fs.

"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>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim
2015-05-12 13:33:00 -07:00
parent 8bacf6deb0
commit 640778fbc9
4 changed files with 13 additions and 15 deletions

View File

@@ -148,14 +148,14 @@ int _f2fs_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 =
f2fs_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 "f2fs crypto: Unsupported inode type.\n");
crypt_info->ci_size =
f2fs_encryption_key_size(crypt_info->ci_filename_mode);
else
BUG();
}
crypt_info->ci_size = f2fs_encryption_key_size(crypt_info->ci_mode);
BUG_ON(!crypt_info->ci_size);
memcpy(full_key_descriptor, F2FS_KEY_DESC_PREFIX,