* [PATCH] erofs: directly use wrapper erofs_page_is_managed() when shrinking
@ 2021-08-10 6:54 Yue Hu
2021-08-10 8:29 ` Gao Xiang
2021-08-10 23:30 ` Chao Yu
0 siblings, 2 replies; 3+ messages in thread
From: Yue Hu @ 2021-08-10 6:54 UTC (permalink / raw)
To: xiang, chao, linux-erofs; +Cc: linux-kernel, huyue2, zbestahu
From: Yue Hu <huyue2@yulong.com>
We already have the wrapper function to identify managed page.
Signed-off-by: Yue Hu <huyue2@yulong.com>
---
fs/erofs/zdata.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 78e4b59..a809730 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -310,7 +310,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;
/*
@@ -327,7 +326,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' */
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] erofs: directly use wrapper erofs_page_is_managed() when shrinking
2021-08-10 6:54 [PATCH] erofs: directly use wrapper erofs_page_is_managed() when shrinking Yue Hu
@ 2021-08-10 8:29 ` Gao Xiang
2021-08-10 23:30 ` Chao Yu
1 sibling, 0 replies; 3+ messages in thread
From: Gao Xiang @ 2021-08-10 8:29 UTC (permalink / raw)
To: Yue Hu; +Cc: xiang, chao, linux-erofs, linux-kernel, huyue2, zbestahu
On Tue, Aug 10, 2021 at 02:54:50PM +0800, Yue Hu wrote:
> From: Yue Hu <huyue2@yulong.com>
>
> We already have the wrapper function to identify managed page.
>
> Signed-off-by: Yue Hu <huyue2@yulong.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Thanks,
Gao Xiang
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] erofs: directly use wrapper erofs_page_is_managed() when shrinking
2021-08-10 6:54 [PATCH] erofs: directly use wrapper erofs_page_is_managed() when shrinking Yue Hu
2021-08-10 8:29 ` Gao Xiang
@ 2021-08-10 23:30 ` Chao Yu
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2021-08-10 23:30 UTC (permalink / raw)
To: Yue Hu, xiang, linux-erofs; +Cc: linux-kernel, huyue2, zbestahu
On 2021/8/10 14:54, Yue Hu wrote:
> From: Yue Hu <huyue2@yulong.com>
>
> We already have the wrapper function to identify managed page.
>
> Signed-off-by: Yue Hu <huyue2@yulong.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-10 23:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 6:54 [PATCH] erofs: directly use wrapper erofs_page_is_managed() when shrinking Yue Hu
2021-08-10 8:29 ` Gao Xiang
2021-08-10 23:30 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).