ext4 crypto: set up encryption info for new inodes in ext4_inherit_context()
Theodore Ts'o [Fri, 29 May 2015 01:39:32 +0000 (21:39 -0400)]
Set up the encryption information for newly created inodes immediately
after they inherit their encryption context from their parent
directories.

Change-Id: Ie2a48cde918eaf8ad978a8a698de24627b363955
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@google.com>

fs/ext4/crypto_policy.c

index 683391f..81980a1 100644 (file)
@@ -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;
 }