Merge tag 'f2fs-for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeu...
[linux-2.6-microblaze.git] / fs / f2fs / f2fs.h
index adda53d..cb700d7 100644 (file)
@@ -139,7 +139,7 @@ struct f2fs_mount_info {
        int fsync_mode;                 /* fsync policy */
        int fs_mode;                    /* fs mode: LFS or ADAPTIVE */
        int bggc_mode;                  /* bggc mode: off, on or sync */
-       struct fscrypt_dummy_context dummy_enc_ctx; /* test dummy encryption */
+       struct fscrypt_dummy_policy dummy_enc_policy; /* test dummy encryption */
        block_t unusable_cap_perc;      /* percentage for cap */
        block_t unusable_cap;           /* Amount of space allowed to be
                                         * unusable when disabling checkpoint
@@ -1340,13 +1340,6 @@ enum fsync_mode {
 #define IS_IO_TRACED_PAGE(page) (0)
 #endif
 
-#ifdef CONFIG_FS_ENCRYPTION
-#define DUMMY_ENCRYPTION_ENABLED(sbi) \
-       (unlikely(F2FS_OPTION(sbi).dummy_enc_ctx.ctx != NULL))
-#else
-#define DUMMY_ENCRYPTION_ENABLED(sbi) (0)
-#endif
-
 /* For compression */
 enum compress_algorithm_type {
        COMPRESS_LZO,
@@ -4071,22 +4064,6 @@ static inline bool f2fs_lfs_mode(struct f2fs_sb_info *sbi)
        return F2FS_OPTION(sbi).fs_mode == FS_MODE_LFS;
 }
 
-static inline bool f2fs_may_encrypt(struct inode *dir, struct inode *inode)
-{
-#ifdef CONFIG_FS_ENCRYPTION
-       struct f2fs_sb_info *sbi = F2FS_I_SB(dir);
-       umode_t mode = inode->i_mode;
-
-       /*
-        * If the directory encrypted or dummy encryption enabled,
-        * then we should encrypt the inode.
-        */
-       if (IS_ENCRYPTED(dir) || DUMMY_ENCRYPTION_ENABLED(sbi))
-               return (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode));
-#endif
-       return false;
-}
-
 static inline bool f2fs_may_compress(struct inode *inode)
 {
        if (IS_SWAPFILE(inode) || f2fs_is_pinned_file(inode) ||