From: Chao Yu <chao@kernel.org>
To: jaegeuk@kernel.org
Cc: linux-kernel@vger.kernel.org,
Matthew Wilcox <willy@infradead.org>,
linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH 3/9] f2fs: convert f2fs_clear_page_cache_dirty_tag() to use folio
Date: Tue, 13 Aug 2024 22:13:25 +0800 [thread overview]
Message-ID: <20240813141331.417067-3-chao@kernel.org> (raw)
In-Reply-To: <20240813141331.417067-1-chao@kernel.org>
Convert to use folio, so that we can get rid of 'page->index' to
prepare for removal of 'index' field in structure page [1].
[1] https://lore.kernel.org/all/Zp8fgUSIBGQ1TN0D@casper.infradead.org/
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/data.c | 3 +--
fs/f2fs/dir.c | 2 +-
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/inline.c | 2 +-
fs/f2fs/node.c | 2 +-
5 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 100b6526717f..0df5a0c66ede 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -4117,9 +4117,8 @@ const struct address_space_operations f2fs_dblock_aops = {
.swap_deactivate = f2fs_swap_deactivate,
};
-void f2fs_clear_page_cache_dirty_tag(struct page *page)
+void f2fs_clear_page_cache_dirty_tag(struct folio *folio)
{
- struct folio *folio = page_folio(page);
struct address_space *mapping = folio->mapping;
unsigned long flags;
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 14900ca8a9ff..5fcc952107e9 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -868,7 +868,7 @@ void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct page *page,
if (bit_pos == NR_DENTRY_IN_BLOCK &&
!f2fs_truncate_hole(dir, page->index, page->index + 1)) {
- f2fs_clear_page_cache_dirty_tag(page);
+ f2fs_clear_page_cache_dirty_tag(page_folio(page));
clear_page_dirty_for_io(page);
ClearPageUptodate(page);
clear_page_private_all(page);
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index df436dd3aac1..a4b90215a51f 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3890,7 +3890,7 @@ void f2fs_write_failed(struct inode *inode, loff_t to);
void f2fs_invalidate_folio(struct folio *folio, size_t offset, size_t length);
bool f2fs_release_folio(struct folio *folio, gfp_t wait);
bool f2fs_overwrite_io(struct inode *inode, loff_t pos, size_t len);
-void f2fs_clear_page_cache_dirty_tag(struct page *page);
+void f2fs_clear_page_cache_dirty_tag(struct folio *folio);
int f2fs_init_post_read_processing(void);
void f2fs_destroy_post_read_processing(void);
int f2fs_init_post_read_wq(struct f2fs_sb_info *sbi);
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index d76a3bed7093..98d122164cd1 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -281,7 +281,7 @@ int f2fs_write_inline_data(struct inode *inode, struct page *page)
page, 0, MAX_INLINE_DATA(inode));
set_page_dirty(ipage);
- f2fs_clear_page_cache_dirty_tag(page);
+ f2fs_clear_page_cache_dirty_tag(page_folio(page));
set_inode_flag(inode, FI_APPEND_WRITE);
set_inode_flag(inode, FI_DATA_EXIST);
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 9e7a6e21f30c..20518c12f5b7 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -123,7 +123,7 @@ bool f2fs_available_free_memory(struct f2fs_sb_info *sbi, int type)
static void clear_node_page_dirty(struct page *page)
{
if (PageDirty(page)) {
- f2fs_clear_page_cache_dirty_tag(page);
+ f2fs_clear_page_cache_dirty_tag(page_folio(page));
clear_page_dirty_for_io(page);
dec_page_count(F2FS_P_SB(page), F2FS_DIRTY_NODES);
}
--
2.40.1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2024-08-13 14:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 14:13 [f2fs-dev] [PATCH 1/9] f2fs: convert f2fs_compress_ctx_add_page() to use folio Chao Yu
2024-08-13 14:13 ` [f2fs-dev] [PATCH 2/9] f2fs: convert f2fs_vm_page_mkwrite() " Chao Yu
2024-08-13 14:13 ` Chao Yu [this message]
2024-08-13 14:13 ` [f2fs-dev] [PATCH 4/9] f2fs: convert f2fs_write_inline_data() " Chao Yu
2024-08-13 14:13 ` [f2fs-dev] [PATCH 5/9] f2fs: convert f2fs_write_single_data_page() " Chao Yu
2024-08-13 14:13 ` [f2fs-dev] [PATCH 6/9] f2fs: convert f2fs_do_write_meta_page() " Chao Yu
2024-08-13 14:13 ` [f2fs-dev] [PATCH 7/9] f2fs: convert __f2fs_write_meta_page() " Chao Yu
2024-08-13 14:13 ` [f2fs-dev] [PATCH 8/9] f2fs: convert f2fs_read_multi_pages() " Chao Yu
2024-08-13 14:13 ` [f2fs-dev] [PATCH 9/9] f2fs: convert f2fs_handle_page_eio() " Chao Yu
2024-08-13 22:24 ` [f2fs-dev] [PATCH 1/9] f2fs: convert f2fs_compress_ctx_add_page() " Jaegeuk Kim
2024-08-14 0:58 ` Chao Yu
2024-08-14 3:17 ` Chao Yu
2024-08-30 20:51 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
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=20240813141331.417067-3-chao@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=willy@infradead.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).