Merge tag 'f2fs-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
[linux-2.6-microblaze.git] / fs / f2fs / f2fs.h
index c812fb8..b35a50f 100644 (file)
@@ -138,7 +138,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 */
-       bool test_dummy_encryption;     /* test dummy encryption */
+       struct fscrypt_dummy_context dummy_enc_ctx; /* 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
@@ -1315,7 +1315,7 @@ enum fsync_mode {
 
 #ifdef CONFIG_FS_ENCRYPTION
 #define DUMMY_ENCRYPTION_ENABLED(sbi) \
-                       (unlikely(F2FS_OPTION(sbi).test_dummy_encryption))
+       (unlikely(F2FS_OPTION(sbi).dummy_enc_ctx.ctx != NULL))
 #else
 #define DUMMY_ENCRYPTION_ENABLED(sbi) (0)
 #endif
@@ -3124,19 +3124,12 @@ static inline void f2fs_set_page_private(struct page *page,
        if (PagePrivate(page))
                return;
 
-       get_page(page);
-       SetPagePrivate(page);
-       set_page_private(page, data);
+       attach_page_private(page, (void *)data);
 }
 
 static inline void f2fs_clear_page_private(struct page *page)
 {
-       if (!PagePrivate(page))
-               return;
-
-       set_page_private(page, 0);
-       ClearPagePrivate(page);
-       f2fs_put_page(page, 0);
+       detach_page_private(page);
 }
 
 /*
@@ -3447,9 +3440,6 @@ int f2fs_reserve_new_block(struct dnode_of_data *dn);
 int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index);
 int f2fs_preallocate_blocks(struct kiocb *iocb, struct iov_iter *from);
 int f2fs_reserve_block(struct dnode_of_data *dn, pgoff_t index);
-int f2fs_mpage_readpages(struct address_space *mapping,
-                       struct list_head *pages, struct page *page,
-                       unsigned nr_pages, bool is_readahead);
 struct page *f2fs_get_read_data_page(struct inode *inode, pgoff_t index,
                        int op_flags, bool for_write);
 struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index);