fscrypt: remove filesystem specific build config option
In order to have a common code base for fscrypt "post read" processing for all filesystems which support encryption, this commit removes filesystem specific build config option (e.g. CONFIG_EXT4_FS_ENCRYPTION) and replaces it with a build option (i.e. CONFIG_FS_ENCRYPTION) whose value affects all the filesystems making use of fscrypt. Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:

committed by
Theodore Ts'o

parent
62230e0d70
commit
643fa9612b
@@ -612,7 +612,7 @@ static struct stats dx_show_leaf(struct inode *dir,
|
||||
{
|
||||
if (show_names)
|
||||
{
|
||||
#ifdef CONFIG_EXT4_FS_ENCRYPTION
|
||||
#ifdef CONFIG_FS_ENCRYPTION
|
||||
int len;
|
||||
char *name;
|
||||
struct fscrypt_str fname_crypto_str =
|
||||
@@ -984,7 +984,7 @@ static int htree_dirblock_to_tree(struct file *dir_file,
|
||||
top = (struct ext4_dir_entry_2 *) ((char *) de +
|
||||
dir->i_sb->s_blocksize -
|
||||
EXT4_DIR_REC_LEN(0));
|
||||
#ifdef CONFIG_EXT4_FS_ENCRYPTION
|
||||
#ifdef CONFIG_FS_ENCRYPTION
|
||||
/* Check if the directory is encrypted */
|
||||
if (IS_ENCRYPTED(dir)) {
|
||||
err = fscrypt_get_encryption_info(dir);
|
||||
@@ -1047,7 +1047,7 @@ static int htree_dirblock_to_tree(struct file *dir_file,
|
||||
}
|
||||
errout:
|
||||
brelse(bh);
|
||||
#ifdef CONFIG_EXT4_FS_ENCRYPTION
|
||||
#ifdef CONFIG_FS_ENCRYPTION
|
||||
fscrypt_fname_free_buffer(&fname_crypto_str);
|
||||
#endif
|
||||
return count;
|
||||
@@ -1267,7 +1267,7 @@ static inline bool ext4_match(const struct ext4_filename *fname,
|
||||
|
||||
f.usr_fname = fname->usr_fname;
|
||||
f.disk_name = fname->disk_name;
|
||||
#ifdef CONFIG_EXT4_FS_ENCRYPTION
|
||||
#ifdef CONFIG_FS_ENCRYPTION
|
||||
f.crypto_buf = fname->crypto_buf;
|
||||
#endif
|
||||
return fscrypt_match_name(&f, de->name, de->name_len);
|
||||
@@ -1498,7 +1498,7 @@ static struct buffer_head * ext4_dx_find_entry(struct inode *dir,
|
||||
ext4_lblk_t block;
|
||||
int retval;
|
||||
|
||||
#ifdef CONFIG_EXT4_FS_ENCRYPTION
|
||||
#ifdef CONFIG_FS_ENCRYPTION
|
||||
*res_dir = NULL;
|
||||
#endif
|
||||
frame = dx_probe(fname, dir, NULL, frames);
|
||||
|
Reference in New Issue
Block a user