mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
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>
This commit is contained in:
parent
c5622a4630
commit
c01547da6b
|
|
@ -622,14 +622,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user