diff options
Diffstat (limited to 'include/linux/fscrypt.h')
-rw-r--r-- | include/linux/fscrypt.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index 7af63e71fe66..aa5e331aed2d 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -23,12 +23,9 @@ #define FS_CRYPTO_BLOCK_SIZE 16 -/* iv sector for security/pfe/pfk_fscrypt.c and f2fs. - * sizeof is required to accommodate all data lengths. - */ +/* iv sector for security/pfe/pfk_fscrypt.c and f2fs */ #define PG_DUN(i, p) \ - ((((i)->i_ino & 0xffffffff) << (sizeof((i)->i_ino)/2)) | \ - ((p)->index & 0xffffffff)) + (((((u64)(i)->i_ino) & 0xffffffff) << 32) | ((p)->index & 0xffffffff)) struct fscrypt_info; @@ -90,7 +87,6 @@ struct fscrypt_operations { bool (*dummy_context)(struct inode *); bool (*empty_dir)(struct inode *); unsigned (*max_namelen)(struct inode *); - bool (*is_encrypted)(struct inode *); }; static inline bool fscrypt_dummy_context_enabled(struct inode *inode) @@ -112,7 +108,8 @@ static inline bool fscrypt_valid_enc_modes(u32 contents_mode, filenames_mode == FS_ENCRYPTION_MODE_AES_256_CTS) return true; - if (contents_mode == FS_ENCRYPTION_MODE_PRIVATE) + if (contents_mode == FS_ENCRYPTION_MODE_PRIVATE && + filenames_mode == FS_ENCRYPTION_MODE_AES_256_CTS) return true; return false; |