summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/crypto_key.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-05-15 15:37:24 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2015-06-01 16:20:59 -0700
commitcfc4d971df411c68e27d903f749e0f6fffd9da40 (patch)
tree912d0fe1b1492daf8fe8ff3322092aba8554b4b5 /fs/f2fs/crypto_key.c
parentb9da898b05859ac4a0ea4460d798b6bb655790f3 (diff)
downloadlinux-cfc4d971df411c68e27d903f749e0f6fffd9da40.tar.gz
linux-cfc4d971df411c68e27d903f749e0f6fffd9da40.tar.bz2
linux-cfc4d971df411c68e27d903f749e0f6fffd9da40.zip
f2fs crypto: split f2fs_crypto_init/exit with two parts
This patch splits f2fs_crypto_init/exit with two parts: base initialization and memory allocation. Firstly, f2fs module declares the base encryption memory pointers. Then, allocating internal memories is done at the first encrypted inode access. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/crypto_key.c')
-rw-r--r--fs/f2fs/crypto_key.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/f2fs/crypto_key.c b/fs/f2fs/crypto_key.c
index 5ae9cc8fd52b..8a10569a8b7c 100644
--- a/fs/f2fs/crypto_key.c
+++ b/fs/f2fs/crypto_key.c
@@ -115,11 +115,9 @@ int _f2fs_get_encryption_info(struct inode *inode)
struct user_key_payload *ukp;
int res;
- if (!f2fs_read_workqueue) {
- res = f2fs_init_crypto();
- if (res)
- return res;
- }
+ res = f2fs_crypto_initialize();
+ if (res)
+ return res;
if (fi->i_crypt_info) {
if (!fi->i_crypt_info->ci_keyring_key ||