Merge tag 'erofs-for-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang...
[linux-2.6-microblaze.git] / fs / erofs / zdata.c
index cb4d088..11c7a1a 100644 (file)
@@ -309,7 +309,6 @@ int erofs_try_to_free_all_cached_pages(struct erofs_sb_info *sbi,
 {
        struct z_erofs_pcluster *const pcl =
                container_of(grp, struct z_erofs_pcluster, obj);
-       struct address_space *const mapping = MNGD_MAPPING(sbi);
        int i;
 
        /*
@@ -326,7 +325,7 @@ int erofs_try_to_free_all_cached_pages(struct erofs_sb_info *sbi,
                if (!trylock_page(page))
                        return -EBUSY;
 
-               if (page->mapping != mapping)
+               if (!erofs_page_is_managed(sbi, page))
                        continue;
 
                /* barrier is implied in the following 'unlock_page' */
@@ -337,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 */