diff mbox series

[f2fs-dev,122/153] f2fs: Pass a folio to f2fs_has_enough_room()

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

Commit Message

Matthew Wilcox (Oracle) March 31, 2025, 8:12 p.m. UTC
The only caller already has a folio so pass it in.

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

Patch

diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 5c02d55563e3..aa3c18a39cd7 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -621,14 +621,14 @@  int f2fs_room_for_filename(const void *bitmap, int slots, int max_slots)
 	goto next;
 }
 
-bool f2fs_has_enough_room(struct inode *dir, struct page *ipage,
+bool f2fs_has_enough_room(struct inode *dir, struct folio *ifolio,
 			  const struct f2fs_filename *fname)
 {
 	struct f2fs_dentry_ptr d;
 	unsigned int bit_pos;
 	int slots = GET_DENTRY_SLOTS(fname->disk_name.len);
 
-	make_dentry_ptr_inline(dir, &d, inline_data_addr(dir, ipage));
+	make_dentry_ptr_inline(dir, &d, inline_data_addr(dir, &ifolio->page));
 
 	bit_pos = f2fs_room_for_filename(d.bitmap, slots, d.max);
 
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 2fc95b671b10..9f4a041b2d7e 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3654,7 +3654,7 @@  ino_t f2fs_inode_by_name(struct inode *dir, const struct qstr *qstr,
 			struct page **page);
 void f2fs_set_link(struct inode *dir, struct f2fs_dir_entry *de,
 			struct page *page, struct inode *inode);
-bool f2fs_has_enough_room(struct inode *dir, struct page *ipage,
+bool f2fs_has_enough_room(struct inode *dir, struct folio *ifolio,
 			  const struct f2fs_filename *fname);
 void f2fs_update_dentry(nid_t ino, umode_t mode, struct f2fs_dentry_ptr *d,
 			const struct fscrypt_str *name, f2fs_hash_t name_hash,
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index d27205a789af..919d30034fe0 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -615,7 +615,7 @@  int f2fs_try_convert_inline_dir(struct inode *dir, struct dentry *dentry)
 		goto out_fname;
 	}
 
-	if (f2fs_has_enough_room(dir, &ifolio->page, &fname)) {
+	if (f2fs_has_enough_room(dir, ifolio, &fname)) {
 		f2fs_folio_put(ifolio, true);
 		goto out_fname;
 	}