erofs: remove the mapping parameter from erofs_try_to_free_cached_page()
authorYue Hu <huyue2@yulong.com>
Tue, 10 Aug 2021 07:24:16 +0000 (15:24 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 11 Aug 2021 01:47:39 +0000 (09:47 +0800)
The mapping is not used at all, remove it and update related code.

Link: https://lore.kernel.org/r/20210810072416.1392-1-zbestahu@gmail.com
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Yue Hu <huyue2@yulong.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/internal.h
fs/erofs/super.c
fs/erofs/zdata.c

index 7c9abfc9310934432dc88e1056b3b9ed61363327..25b094085ca63e7729dd886f349ffd0f9a4dc18d 100644 (file)
@@ -445,8 +445,7 @@ int __init z_erofs_init_zip_subsystem(void);
 void z_erofs_exit_zip_subsystem(void);
 int erofs_try_to_free_all_cached_pages(struct erofs_sb_info *sbi,
                                       struct erofs_workgroup *egrp);
-int erofs_try_to_free_cached_page(struct address_space *mapping,
-                                 struct page *page);
+int erofs_try_to_free_cached_page(struct page *page);
 int z_erofs_load_lz4_config(struct super_block *sb,
                            struct erofs_super_block *dsb,
                            struct z_erofs_lz4_cfgs *lz4, int len);
index e8de689c94f4cca6150bc577644241384a12e2ca..a8d49e8fc83a3b774f2fcf216893fcbee423cf39 100644 (file)
@@ -474,7 +474,7 @@ static int erofs_managed_cache_releasepage(struct page *page, gfp_t gfp_mask)
        DBG_BUGON(mapping->a_ops != &managed_cache_aops);
 
        if (PagePrivate(page))
-               ret = erofs_try_to_free_cached_page(mapping, page);
+               ret = erofs_try_to_free_cached_page(page);
 
        return ret;
 }
index fe724d6d68560d9266bfba0916f7ea314a2741d6..11c7a1aaebadea4f019d4a87d8aa6c47fc12115a 100644 (file)
@@ -336,8 +336,7 @@ int erofs_try_to_free_all_cached_pages(struct erofs_sb_info *sbi,
        return 0;
 }
 
-int erofs_try_to_free_cached_page(struct address_space *mapping,
-                                 struct page *page)
+int erofs_try_to_free_cached_page(struct page *page)
 {
        struct z_erofs_pcluster *const pcl = (void *)page_private(page);
        int ret = 0;    /* 0 - busy */