diff options
author | Theodore Ts'o <tytso@mit.edu> | 2015-04-16 01:56:00 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-04-16 01:56:00 -0400 |
commit | 6ddb2447846a8ece111e316a2863c2355023682d (patch) | |
tree | e56b2d3100baf35e7d99d79ff411c28bf8c5f4c2 /fs/ext4/namei.c | |
parent | f348c252320b98e11176074fe04223f22bddaf0d (diff) | |
download | op-kernel-dev-6ddb2447846a8ece111e316a2863c2355023682d.zip op-kernel-dev-6ddb2447846a8ece111e316a2863c2355023682d.tar.gz |
ext4 crypto: enable encryption feature flag
Also add the test dummy encryption mode flag so we can more easily
test the encryption patches using xfstests.
Signed-off-by: Michael Halcrow <mhalcrow@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/namei.c')
-rw-r--r-- | fs/ext4/namei.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index d201426..4f87127 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2582,7 +2582,8 @@ retry: ext4_set_aops(inode); err = 0; #ifdef CONFIG_EXT4_FS_ENCRYPTION - if (!err && ext4_encrypted_inode(dir)) { + if (!err && (ext4_encrypted_inode(dir) || + DUMMY_ENCRYPTION_ENABLED(EXT4_SB(dir->i_sb)))) { err = ext4_inherit_context(dir, inode); if (err) { clear_nlink(inode); @@ -2777,7 +2778,8 @@ retry: if (err) goto out_clear_inode; #ifdef CONFIG_EXT4_FS_ENCRYPTION - if (ext4_encrypted_inode(dir)) { + if (ext4_encrypted_inode(dir) || + DUMMY_ENCRYPTION_ENABLED(EXT4_SB(dir->i_sb))) { err = ext4_inherit_context(dir, inode); if (err) goto out_clear_inode; @@ -3202,7 +3204,8 @@ static int ext4_symlink(struct inode *dir, disk_link.len = len + 1; disk_link.name = (char *) symname; - encryption_required = ext4_encrypted_inode(dir); + encryption_required = (ext4_encrypted_inode(dir) || + DUMMY_ENCRYPTION_ENABLED(EXT4_SB(dir->i_sb))); if (encryption_required) disk_link.len = encrypted_symlink_data_len(len) + 1; if (disk_link.len > dir->i_sb->s_blocksize) |