diff mbox series

[f2fs-dev,130/153] f2fs: Pass a folio to f2fs_delete_inline_entry()

Message ID 20250331201256.1057782-131-willy@infradead.org (mailing list archive)
State New
Headers show
Series f2fs folio conversions for 6.16 | expand

Commit Message

Matthew Wilcox March 31, 2025, 8:12 p.m. UTC
The caller now has a folio so pass it in.  Removes four calls to
compound_head().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/f2fs/dir.c    |  2 +-
 fs/f2fs/f2fs.h   |  3 +--
 fs/f2fs/inline.c | 14 +++++++-------
 3 files changed, 9 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 610091345ac3..6dfe7f859265 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -875,7 +875,7 @@  void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct folio *folio,
 		f2fs_add_ino_entry(F2FS_I_SB(dir), dir->i_ino, TRANS_DIR_INO);
 
 	if (f2fs_has_inline_dentry(dir))
-		return f2fs_delete_inline_entry(dentry, &folio->page, dir, inode);
+		return f2fs_delete_inline_entry(dentry, folio, dir, inode);
 
 	folio_lock(folio);
 	f2fs_folio_wait_writeback(folio, DATA, true, true);
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 6b0f572e1602..dc7463004c75 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -4289,8 +4289,7 @@  int f2fs_make_empty_inline_dir(struct inode *inode, struct inode *parent,
 int f2fs_add_inline_entry(struct inode *dir, const struct f2fs_filename *fname,
 			struct inode *inode, nid_t ino, umode_t mode);
 void f2fs_delete_inline_entry(struct f2fs_dir_entry *dentry,
-				struct page *page, struct inode *dir,
-				struct inode *inode);
+		struct folio *folio, struct inode *dir, struct inode *inode);
 bool f2fs_empty_inline_dir(struct inode *dir);
 int f2fs_read_inline_dir(struct file *file, struct dir_context *ctx,
 			struct fscrypt_str *fstr);
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index c2e97e230cd1..1c6dc9731f2a 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -697,8 +697,8 @@  int f2fs_add_inline_entry(struct inode *dir, const struct f2fs_filename *fname,
 	return err;
 }
 
-void f2fs_delete_inline_entry(struct f2fs_dir_entry *dentry, struct page *page,
-					struct inode *dir, struct inode *inode)
+void f2fs_delete_inline_entry(struct f2fs_dir_entry *dentry,
+		struct folio *folio, struct inode *dir, struct inode *inode)
 {
 	struct f2fs_dentry_ptr d;
 	void *inline_dentry;
@@ -706,18 +706,18 @@  void f2fs_delete_inline_entry(struct f2fs_dir_entry *dentry, struct page *page,
 	unsigned int bit_pos;
 	int i;
 
-	lock_page(page);
-	f2fs_wait_on_page_writeback(page, NODE, true, true);
+	folio_lock(folio);
+	f2fs_folio_wait_writeback(folio, NODE, true, true);
 
-	inline_dentry = inline_data_addr(dir, page);
+	inline_dentry = inline_data_addr(dir, &folio->page);
 	make_dentry_ptr_inline(dir, &d, inline_dentry);
 
 	bit_pos = dentry - d.dentry;
 	for (i = 0; i < slots; i++)
 		__clear_bit_le(bit_pos + i, d.bitmap);
 
-	set_page_dirty(page);
-	f2fs_put_page(page, 1);
+	folio_mark_dirty(folio);
+	f2fs_folio_put(folio, true);
 
 	inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
 	f2fs_mark_inode_dirty_sync(dir, false);