diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-05-12 22:33:00 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-06-02 01:20:56 +0200 |
commit | 640778fbc97b36757bd1f857ba4b599a200517c2 (patch) | |
tree | 9cbbe8144f1a4090c23ebdf96104287224df2d2a /fs/f2fs/crypto_key.c | |
parent | f2fs crypto: use slab caches (diff) | |
download | linux-640778fbc97b36757bd1f857ba4b599a200517c2.tar.xz linux-640778fbc97b36757bd1f857ba4b599a200517c2.zip |
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>
Diffstat (limited to 'fs/f2fs/crypto_key.c')
-rw-r--r-- | fs/f2fs/crypto_key.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/f2fs/crypto_key.c b/fs/f2fs/crypto_key.c index 6b9312b281b7..5ae9cc8fd52b 100644 --- a/fs/f2fs/crypto_key.c +++ b/fs/f2fs/crypto_key.c @@ -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, |