summaryrefslogtreecommitdiff
path: root/fs/erofs
diff options
context:
space:
mode:
authorYue Hu <huyue2@yulong.com>2021-08-10 09:54:50 +0300
committerGao Xiang <hsiangkao@linux.alibaba.com>2021-08-11 04:46:34 +0300
commitf4d4e5fc2b3d03c7e4f3c24ee694a01f8fe27d53 (patch)
tree4c11ae346a13608bbe95a0cc5c77754dc333eb87 /fs/erofs
parent771c994ea51f572539ca3961c6a7706862b147e2 (diff)
downloadlinux-f4d4e5fc2b3d03c7e4f3c24ee694a01f8fe27d53.tar.xz
erofs: directly use wrapper erofs_page_is_managed() when shrinking
We already have the wrapper function to identify managed page. Link: https://lore.kernel.org/r/20210810065450.1320-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>
Diffstat (limited to 'fs/erofs')
-rw-r--r--fs/erofs/zdata.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index cb4d0889eca9..fe724d6d6856 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -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' */