diff options
author | Theodore Ts'o <tytso@mit.edu> | 2015-05-18 13:18:47 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-05-18 13:18:47 -0400 |
commit | f5aed2c2a825618553b20e8a67109570489b40d7 (patch) | |
tree | e0a69234f0f5f53ba1bbcab70290bebb79936f61 /fs/ext4/ialloc.c | |
parent | b7236e21d55ff9008737621c84dd8ee6c37c7c6d (diff) | |
download | op-kernel-dev-f5aed2c2a825618553b20e8a67109570489b40d7.zip op-kernel-dev-f5aed2c2a825618553b20e8a67109570489b40d7.tar.gz |
ext4: clean up superblock encryption mode fields
The superblock fields s_file_encryption_mode and s_dir_encryption_mode
are vestigal, so remove them as a cleanup. While we're at it, allow
file systems with both encryption and inline_data enabled at the same
time to work correctly. We can't have encrypted inodes with inline
data, but there's no reason to prohibit unencrypted inodes from using
the inline data feature.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 1eaa6cb..ddca169 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -1034,28 +1034,9 @@ got: ext4_set_inode_state(inode, EXT4_STATE_NEW); ei->i_extra_isize = EXT4_SB(sb)->s_want_extra_isize; -#ifdef CONFIG_EXT4_FS_ENCRYPTION - if ((sbi->s_file_encryption_mode == EXT4_ENCRYPTION_MODE_INVALID) && - (sbi->s_dir_encryption_mode == EXT4_ENCRYPTION_MODE_INVALID)) { - ei->i_inline_off = 0; - if (EXT4_HAS_INCOMPAT_FEATURE(sb, - EXT4_FEATURE_INCOMPAT_INLINE_DATA)) - ext4_set_inode_state(inode, - EXT4_STATE_MAY_INLINE_DATA); - } else { - /* Inline data and encryption are incompatible - * We turn off inline data since encryption is enabled */ - ei->i_inline_off = 1; - if (EXT4_HAS_INCOMPAT_FEATURE(sb, - EXT4_FEATURE_INCOMPAT_INLINE_DATA)) - ext4_clear_inode_state(inode, - EXT4_STATE_MAY_INLINE_DATA); - } -#else ei->i_inline_off = 0; if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_INLINE_DATA)) ext4_set_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); -#endif ret = inode; err = dquot_alloc_inode(inode); if (err) |