diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-05-16 01:37:24 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-06-02 02:20:59 +0300 |
commit | cfc4d971df411c68e27d903f749e0f6fffd9da40 (patch) | |
tree | 912d0fe1b1492daf8fe8ff3322092aba8554b4b5 /fs/f2fs/crypto_key.c | |
parent | b9da898b05859ac4a0ea4460d798b6bb655790f3 (diff) | |
download | linux-cfc4d971df411c68e27d903f749e0f6fffd9da40.tar.xz |
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.c | 8 |
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 || |