Merge tag 'ext4-for-linus-5.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-block.git] / fs / ext4 / ext4.h
index 5148cbb0b4b34f7c29139fafd9ac6d382098d8e9..42f5060f3cdf19748acdbf076fb08f0170cbac72 100644 (file)
@@ -1381,11 +1381,9 @@ struct ext4_super_block {
  */
 #define EXT4_MF_MNTDIR_SAMPLED         0x0001
 #define EXT4_MF_FS_ABORTED             0x0002  /* Fatal error detected */
-#define EXT4_MF_TEST_DUMMY_ENCRYPTION  0x0004
 
 #ifdef CONFIG_FS_ENCRYPTION
-#define DUMMY_ENCRYPTION_ENABLED(sbi) (unlikely((sbi)->s_mount_flags & \
-                                               EXT4_MF_TEST_DUMMY_ENCRYPTION))
+#define DUMMY_ENCRYPTION_ENABLED(sbi) ((sbi)->s_dummy_enc_ctx.ctx != NULL)
 #else
 #define DUMMY_ENCRYPTION_ENABLED(sbi) (0)
 #endif
@@ -1575,6 +1573,9 @@ struct ext4_sb_info {
        struct ratelimit_state s_warning_ratelimit_state;
        struct ratelimit_state s_msg_ratelimit_state;
 
+       /* Encryption context for '-o test_dummy_encryption' */
+       struct fscrypt_dummy_context s_dummy_enc_ctx;
+
        /*
         * Barrier between writepages ops and changing any inode's JOURNAL_DATA
         * or EXTENTS flag.
@@ -3341,9 +3342,8 @@ static inline void ext4_set_de_type(struct super_block *sb,
 }
 
 /* readpages.c */
-extern int ext4_mpage_readpages(struct address_space *mapping,
-                               struct list_head *pages, struct page *page,
-                               unsigned nr_pages, bool is_readahead);
+extern int ext4_mpage_readpages(struct inode *inode,
+               struct readahead_control *rac, struct page *page);
 extern int __init ext4_init_post_read_processing(void);
 extern void ext4_exit_post_read_processing(void);