diff options
Diffstat (limited to 'fs/f2fs/f2fs.h')
| -rw-r--r-- | fs/f2fs/f2fs.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 8f23ee6e8eb9..7ea5c9cede37 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | #include <linux/quotaops.h> | 24 | #include <linux/quotaops.h> |
| 25 | #include <crypto/hash.h> | 25 | #include <crypto/hash.h> |
| 26 | 26 | ||
| 27 | #define __FS_HAS_ENCRYPTION IS_ENABLED(CONFIG_F2FS_FS_ENCRYPTION) | ||
| 28 | #include <linux/fscrypt.h> | 27 | #include <linux/fscrypt.h> |
| 29 | 28 | ||
| 30 | #ifdef CONFIG_F2FS_CHECK_FS | 29 | #ifdef CONFIG_F2FS_CHECK_FS |
| @@ -1137,7 +1136,7 @@ enum fsync_mode { | |||
| 1137 | FSYNC_MODE_NOBARRIER, /* fsync behaves nobarrier based on posix */ | 1136 | FSYNC_MODE_NOBARRIER, /* fsync behaves nobarrier based on posix */ |
| 1138 | }; | 1137 | }; |
| 1139 | 1138 | ||
| 1140 | #ifdef CONFIG_F2FS_FS_ENCRYPTION | 1139 | #ifdef CONFIG_FS_ENCRYPTION |
| 1141 | #define DUMMY_ENCRYPTION_ENABLED(sbi) \ | 1140 | #define DUMMY_ENCRYPTION_ENABLED(sbi) \ |
| 1142 | (unlikely(F2FS_OPTION(sbi).test_dummy_encryption)) | 1141 | (unlikely(F2FS_OPTION(sbi).test_dummy_encryption)) |
| 1143 | #else | 1142 | #else |
| @@ -3463,19 +3462,14 @@ void f2fs_unregister_sysfs(struct f2fs_sb_info *sbi); | |||
| 3463 | /* | 3462 | /* |
| 3464 | * crypto support | 3463 | * crypto support |
| 3465 | */ | 3464 | */ |
| 3466 | static inline bool f2fs_encrypted_inode(struct inode *inode) | ||
| 3467 | { | ||
| 3468 | return file_is_encrypt(inode); | ||
| 3469 | } | ||
| 3470 | |||
| 3471 | static inline bool f2fs_encrypted_file(struct inode *inode) | 3465 | static inline bool f2fs_encrypted_file(struct inode *inode) |
| 3472 | { | 3466 | { |
| 3473 | return f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode); | 3467 | return IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode); |
| 3474 | } | 3468 | } |
| 3475 | 3469 | ||
| 3476 | static inline void f2fs_set_encrypted_inode(struct inode *inode) | 3470 | static inline void f2fs_set_encrypted_inode(struct inode *inode) |
| 3477 | { | 3471 | { |
| 3478 | #ifdef CONFIG_F2FS_FS_ENCRYPTION | 3472 | #ifdef CONFIG_FS_ENCRYPTION |
| 3479 | file_set_encrypt(inode); | 3473 | file_set_encrypt(inode); |
| 3480 | f2fs_set_inode_flags(inode); | 3474 | f2fs_set_inode_flags(inode); |
| 3481 | #endif | 3475 | #endif |
| @@ -3554,7 +3548,7 @@ static inline void set_opt_mode(struct f2fs_sb_info *sbi, unsigned int mt) | |||
| 3554 | 3548 | ||
| 3555 | static inline bool f2fs_may_encrypt(struct inode *inode) | 3549 | static inline bool f2fs_may_encrypt(struct inode *inode) |
| 3556 | { | 3550 | { |
| 3557 | #ifdef CONFIG_F2FS_FS_ENCRYPTION | 3551 | #ifdef CONFIG_FS_ENCRYPTION |
| 3558 | umode_t mode = inode->i_mode; | 3552 | umode_t mode = inode->i_mode; |
| 3559 | 3553 | ||
| 3560 | return (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)); | 3554 | return (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)); |
