From: Yue Hu <zbestahu@gmail.com> To: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, huyue2@yulong.com, zbestahu@163.com Subject: [PATCH] erofs: directly use wrapper erofs_page_is_managed() when shrinking Date: Tue, 10 Aug 2021 14:54:50 +0800 [thread overview] Message-ID: <20210810065450.1320-1-zbestahu@gmail.com> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: Yue Hu <zbestahu@gmail.com> To: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org Cc: huyue2@yulong.com, linux-kernel@vger.kernel.org, zbestahu@163.com Subject: [PATCH] erofs: directly use wrapper erofs_page_is_managed() when shrinking Date: Tue, 10 Aug 2021 14:54:50 +0800 [thread overview] Message-ID: <20210810065450.1320-1-zbestahu@gmail.com> (raw) 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
next reply other threads:[~2021-08-10 6:55 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-10 6:54 Yue Hu [this message] 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 8:29 ` Gao Xiang 2021-08-10 23:30 ` Chao Yu 2021-08-10 23:30 ` Chao Yu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210810065450.1320-1-zbestahu@gmail.com \ --to=zbestahu@gmail.com \ --cc=chao@kernel.org \ --cc=huyue2@yulong.com \ --cc=linux-erofs@lists.ozlabs.org \ --cc=linux-kernel@vger.kernel.org \ --cc=xiang@kernel.org \ --cc=zbestahu@163.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.