From: Matthew Wilcox (Oracle) Date: Mon, 31 Mar 2025 20:11:17 +0000 (+0100) Subject: f2fs: Use a folio in make_empty_dir() X-Git-Tag: v6.16-rc1~115^2~126 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a85127c58a3b68fec5f9072c4c9358d27c08333b;p=linux-block.git f2fs: Use a folio in make_empty_dir() Remove two hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index f65625f90f19..ee238ac9658a 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -494,24 +494,24 @@ void f2fs_do_make_empty_dir(struct inode *inode, struct inode *parent, static int make_empty_dir(struct inode *inode, struct inode *parent, struct page *page) { - struct page *dentry_page; + struct folio *dentry_folio; struct f2fs_dentry_block *dentry_blk; struct f2fs_dentry_ptr d; if (f2fs_has_inline_dentry(inode)) return f2fs_make_empty_inline_dir(inode, parent, page); - dentry_page = f2fs_get_new_data_page(inode, page, 0, true); - if (IS_ERR(dentry_page)) - return PTR_ERR(dentry_page); + dentry_folio = f2fs_get_new_data_folio(inode, page, 0, true); + if (IS_ERR(dentry_folio)) + return PTR_ERR(dentry_folio); - dentry_blk = page_address(dentry_page); + dentry_blk = folio_address(dentry_folio); make_dentry_ptr_block(NULL, &d, dentry_blk); f2fs_do_make_empty_dir(inode, parent, &d); - set_page_dirty(dentry_page); - f2fs_put_page(dentry_page, 1); + folio_mark_dirty(dentry_folio); + f2fs_folio_put(dentry_folio, true); return 0; }