summaryrefslogtreecommitdiffstats
path: root/fs/ext4/crypto_policy.c
diff options
context:
space:
mode:
authorTheodore Ts'o2015-05-31 19:34:29 +0200
committerTheodore Ts'o2015-05-31 19:34:29 +0200
commit5555702955326ac1b9971f81569d8a6851384d49 (patch)
treeaa90767f6a75c138b2d388bbb28f96b565bd74b2 /fs/ext4/crypto_policy.c
parentext4 crypto: fix memory leaks in ext4_encrypted_zeroout (diff)
downloadkernel-qcow2-linux-5555702955326ac1b9971f81569d8a6851384d49.tar.gz
kernel-qcow2-linux-5555702955326ac1b9971f81569d8a6851384d49.tar.xz
kernel-qcow2-linux-5555702955326ac1b9971f81569d8a6851384d49.zip
ext4 crypto: set up encryption info for new inodes in ext4_inherit_context()
Set up the encryption information for newly created inodes immediately after they inherit their encryption context from their parent directories. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/crypto_policy.c')
-rw-r--r--fs/ext4/crypto_policy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/crypto_policy.c b/fs/ext4/crypto_policy.c
index 683391f790d6..81980a158dc7 100644
--- a/fs/ext4/crypto_policy.c
+++ b/fs/ext4/crypto_policy.c
@@ -206,6 +206,7 @@ int ext4_inherit_context(struct inode *parent, struct inode *child)
if (!res) {
ext4_set_inode_flag(child, EXT4_INODE_ENCRYPT);
ext4_clear_inode_state(child, EXT4_STATE_MAY_INLINE_DATA);
+ res = ext4_get_encryption_info(child);
}
return res;
}