summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2025-03-31 23:12:22 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2025-04-28 18:26:43 +0300
commitc01547da6b1554db0ca5cec4a3995810cdcae395 (patch)
tree91f9b105f47bdb00f9358ea91fbbb5d7c43167c3
parentc5622a4630b44ae7ed44938614045a59937b049d (diff)
downloadlinux-c01547da6b1554db0ca5cec4a3995810cdcae395.tar.xz
f2fs: Pass a folio to f2fs_has_enough_room()
The only caller already has a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/dir.c4
-rw-r--r--fs/f2fs/f2fs.h2
-rw-r--r--fs/f2fs/inline.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 10e7742c5e0b..284f4ef11e25 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -622,14 +622,14 @@ next:
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 43216254a056..9c3b6b84f0f5 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3668,7 +3668,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;
}