diff options
author | Theodore Ts'o <tytso@mit.edu> | 2015-04-16 01:55:00 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-04-16 01:55:00 -0400 |
commit | f348c252320b98e11176074fe04223f22bddaf0d (patch) | |
tree | 71fe0a1c86bd14f661a7e823e3b330adfc2719e3 /fs/ext4/inode.c | |
parent | 4461471107b79bee16c497c9f7f69fa26126ae5b (diff) | |
download | linux-f348c252320b98e11176074fe04223f22bddaf0d.tar.bz2 |
ext4 crypto: add symlink encryption
Signed-off-by: Uday Savagaonkar <savagaon@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 8b4fe626919a..f6b35d8a4a5b 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -139,7 +139,7 @@ static int ext4_meta_trans_blocks(struct inode *inode, int lblocks, /* * Test whether an inode is a fast symlink. */ -static int ext4_inode_is_fast_symlink(struct inode *inode) +int ext4_inode_is_fast_symlink(struct inode *inode) { int ea_blocks = EXT4_I(inode)->i_file_acl ? EXT4_CLUSTER_SIZE(inode->i_sb) >> 9 : 0; @@ -4215,7 +4215,8 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino) inode->i_op = &ext4_dir_inode_operations; inode->i_fop = &ext4_dir_operations; } else if (S_ISLNK(inode->i_mode)) { - if (ext4_inode_is_fast_symlink(inode)) { + if (ext4_inode_is_fast_symlink(inode) && + !ext4_encrypted_inode(inode)) { inode->i_op = &ext4_fast_symlink_inode_operations; nd_terminate_link(ei->i_data, inode->i_size, sizeof(ei->i_data) - 1); |