Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:35 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_set_link()
All callers now have a folio, pass it in. Removes four calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:34 +0000 (21:12 +0100)]
f2fs: Convert f2fs_put_page_dic() to f2fs_put_folio_dic()
The only caller 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>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:33 +0000 (21:12 +0100)]
f2fs: Pass a folio to inline_data_addr()
All callers now have 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>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:32 +0000 (21:12 +0100)]
f2fs: Pass a folio to __recover_inline_status()
The only caller has a folio so pass it in. Removes two calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:31 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_recover_inline_data()
The only caller 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>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:30 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_delete_inline_entry()
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>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:29 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_delete_entry()
All callers now have a folio so pass it in. Removes eight calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:28 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_parent_dir()
Convert all the callers to pass a folio. Removes three calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:27 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_find_entry()
Convert all callers to pass in a pointer to a folio instead of a page.
Also convert f2fs_inode_by_name() to take a folio pointer. Removes
six calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:26 +0000 (21:12 +0100)]
f2fs: Pass a folio to __f2fs_find_entry()
Also pass a folio to f2fs_find_in_inline_dir() and find_in_level().
Remove three calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:25 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_truncate_inline_inode()
All callers now have a folio, so pass it in. Removes a call to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:24 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_do_read_inline_data()
All callers now have 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>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:23 +0000 (21:12 +0100)]
f2fs: Convert dnode_of_data->inode_page to inode_folio
Also rename inode_page_locked to inode_folio_locked. Removes five
calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:22 +0000 (21:12 +0100)]
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>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:21 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_make_empty_inline_dir()
The only caller already has a folio, so pass it in. Removes a
hidden call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:20 +0000 (21:12 +0100)]
f2fs: Pass a folio to init_dent_inode()
The only caller has a folio, so pass it in. Removes two hidden calls
to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:19 +0000 (21:12 +0100)]
f2fs: Pass a folio to inline_xattr_addr()
All callers now have 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>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:18 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_recover_inline_xattr()
The caller 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>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:17 +0000 (21:12 +0100)]
f2fs: Pass a folio to do_recover_data()
Push the page conversion into do_recover_data().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:16 +0000 (21:12 +0100)]
f2fs: Pass a folio to read_inline_xattr()
Both callers have 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>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:15 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_getxattr()
The one caller of __f2fs_get_acl() which passes a non-NULL page already
has a folio, so pass it in, then into f2fs_getxattr(), which lets us
pass it to lookup_all_xattrs().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:14 +0000 (21:12 +0100)]
f2fs: Remove f2fs_get_inode_page()
All callers have now been converted to call f2fs_get_inode_folio().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:13 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_recover_inline_xattr()
Remove a hidden call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:12 +0000 (21:12 +0100)]
f2fs: Use a folio in read_inline_xattr()
Remove a hidden call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:11 +0000 (21:12 +0100)]
f2fs: Pass a folio to write_all_xattrs()
Also convert in_page to in_folio. Save five hidden calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:10 +0000 (21:12 +0100)]
f2fs: Pass a folio to __f2fs_setxattr()
Also pass the folio into read_all_xattrs().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:09 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_setxattr()
Also convert f2fs_initxattrs() to take a folio.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:08 +0000 (21:12 +0100)]
f2fs: Pass folios to f2fs_init_acl()
The one caller already has folios, so pass them in, and further pass
them to __f2fs_set_acl() and f2fs_acl_create(). There should be
no change to the generated code for this commit.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:07 +0000 (21:12 +0100)]
f2fs: Use a folio in do_read_inode()
Remove five calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:06 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_update_inode_page()
Remove a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:05 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_inline_data_fiemap()
Remove a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:04 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_read_inline_dir()
Remove two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:03 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_empty_inline_dir()
Remove a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:02 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_find_in_inline_dir()
Remove two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:01 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_recover_inline_data()
Remove four calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:00 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_read_inline_data()
Remove two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:59 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_write_inline_data()
Remove four calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:58 +0000 (21:11 +0100)]
f2fs: Remove f2fs_get_xnode_page()
All callers have now been converted to call f2fs_get_xnode_folio().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:57 +0000 (21:11 +0100)]
f2fs: Use a folio in read_xattr_block()
Remove a call to compound_head()
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:56 +0000 (21:11 +0100)]
f2fs: Convert f2fs_convert_inline_page() to f2fs_convert_inline_folio()
Both callers have a folio, so pass it in. Removes seven calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:55 +0000 (21:11 +0100)]
f2fs: Pass folios to set_new_dnode()
Removes a lot of conversions of folios into pages.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:54 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_truncate_xattr_node()
Remove a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:53 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_do_truncate_blocks()
Removes two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:52 +0000 (21:11 +0100)]
f2fs: Pass a folio to f2fs_move_rehashed_dirents()
Remove seven hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:51 +0000 (21:11 +0100)]
f2fs: Pass a folio to f2fs_move_inline_dirents()
Pass the folio through do_convert_inline_dir() to
f2fs_move_inline_dirents(). Remove a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:50 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_add_inline_entry()
Also convert f2fs_init_inode_metadata() to take a folio. Remove
Remove three calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:49 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_try_convert_inline_dir()
Remove two hidden calls to compound_head()
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:48 +0000 (21:11 +0100)]
f2fs: Pass a folio to make_empty_dir()
Pass the folio into make_empty_dir() and then into
f2fs_get_new_data_folio(). Removes a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:47 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_init_inode_metadata()
Since this is the only caller of f2fs_new_inode_page(), convert that
to return a folio at the same time. Removes four calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:46 +0000 (21:11 +0100)]
f2fs: Use a folio in __find_data_block()
Remove a call to f2fs_get_inode_page().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:45 +0000 (21:11 +0100)]
f2fs: Use a folio in prepare_write_begin
Remove a call to f2fs_get_inode_page().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:44 +0000 (21:11 +0100)]
f2fs: Remove f2fs_get_node_page()
All callers have now been converted to call f2fs_get_node_folio().
Remove this wrapper.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:43 +0000 (21:11 +0100)]
f2fs: Use a folio in check_index_in_prev_nodes()
Remove a hidden call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:42 +0000 (21:11 +0100)]
f2fs: Use a folio in is_alive()
Remove four calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:41 +0000 (21:11 +0100)]
f2fs: Convert __write_node_page() to __write_node_folio()
All three callers now have a folio so pass it in. Removes
two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:40 +0000 (21:11 +0100)]
f2fs: Convert f2fs_move_node_page() to f2fs_move_node_folio()
Pass the folio in from the one caller and use it throughout.
Removes eight hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:39 +0000 (21:11 +0100)]
f2fs: Use a folio in gc_node_segment()
Remove three calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:38 +0000 (21:11 +0100)]
f2fs: Pass a folio to f2fs_ra_node_pages()
Removes a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:37 +0000 (21:11 +0100)]
f2fs: Use folios in truncate_partial_nodes()
Removes two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:36 +0000 (21:11 +0100)]
f2fs: Use a folio in truncate_nodes()
Remove two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:35 +0000 (21:11 +0100)]
f2fs: Use a folio in truncate_node()
Remove two calls to compound_head()
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:34 +0000 (21:11 +0100)]
f2fs: Use folios in f2fs_get_dnode_of_data()
Pass the folio into __get_node_folio() and f2fs_get_node_page_ra() which
becomes f2fs_get_node_folio_ra(). That function has no callers outside
node.c, so make it static. Removes seven calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:33 +0000 (21:11 +0100)]
f2fs: Add f2fs_get_node_folio()
The folio equivalent of f2fs_get_node_page().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:32 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_recover_xattr_data()
Remove two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:31 +0000 (21:11 +0100)]
f2fs: Use a folio in write_all_xattrs()
Removes three hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:30 +0000 (21:11 +0100)]
f2fs: Add f2fs_get_xnode_folio()
The folio equivalent of f2fs_get_xnode_page().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:29 +0000 (21:11 +0100)]
f2fs: Remove f2fs_grab_cache_page()
All callers have now been converted to f2fs_grab_cache_folio() so
we can remove this wrapper.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:28 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_recover_inode_page()
Save four hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:27 +0000 (21:11 +0100)]
f2fs: Pass a folio to f2fs_inode_chksum_verify()
Both callers now have a folio, so pass it in. Removes three calls
to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:26 +0000 (21:11 +0100)]
f2fs: Convert read_node_page() to read_node_folio()
Both callers now have a folio, so pass it in and remove the
conversion back to a folio. Removes two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:25 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_ra_node_page()
Save a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:24 +0000 (21:11 +0100)]
f2fs: Add f2fs_new_node_folio()
Convert f2fs_new_node_page() to f2fs_new_node_folio() and add
a compatibility wrapper. Removes five hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:23 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_move_inline_dirents()
Remove eight hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:22 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_convert_inline_inode()
Remove a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:21 +0000 (21:11 +0100)]
f2fs: Use a folio in move_data_block()
Remove 11 hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:20 +0000 (21:11 +0100)]
f2fs: Use a folio in ra_data_block()
Remove three hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:19 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_xattr_fiemap()
Remove four hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:18 +0000 (21:11 +0100)]
f2fs: Remove f2fs_get_new_data_page()
All callers have been converted to call f2fs_get_new_data_folio()
so delete this wrapper.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:17 +0000 (21:11 +0100)]
f2fs: Use a folio in make_empty_dir()
Remove two hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:16 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_add_regular_entry()
Remove three hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:15 +0000 (21:11 +0100)]
f2fs: Use a folio in fill_zero()
Remove three hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:14 +0000 (21:11 +0100)]
f2fs: Remove f2fs_get_lock_data_page()
All callers have now been converted to f2fs_get_lock_data_folio(),
so remove this wrapper.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:13 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_defragment_range()
Remove three hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:12 +0000 (21:11 +0100)]
f2fs: Use a folio in __clone_blkaddrs()
Removes five hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:11 +0000 (21:11 +0100)]
highmem: Add memcpy_folio()
The folio equivalent of memcpy_page(). It should correctly and
efficiently manage large folios:
- If one, neither or both is highmem
- If (either or both) offset+len crosses a page boundary
- If the two offsets are congruent or not
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:10 +0000 (21:11 +0100)]
f2fs: Add f2fs_get_new_data_folio()
Convert f2fs_get_new_data_page() into f2fs_get_new_data_folio() and
add a f2fs_get_new_data_page() wrapper.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:09 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_migrate_blocks()
Get a folio from the pagecache and use it throughout. Removes two
calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:08 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_get_new_data_page()
Get folios from the pagecache instead of pages. Remove five calls to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:07 +0000 (21:11 +0100)]
f2fs: Remove f2fs_find_data_page()
All callers have now been converted to call f2fs_find_data_folio().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:06 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_readdir()
Get a folio instead of a page and use it throughout. Also put the folio
before checking the error so we only have to do it once. Saves two
hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:05 +0000 (21:11 +0100)]
f2fs: Use a folio in f2fs_delete_entry()
Get a folio instead of a page and operate on it. Saves a call to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:04 +0000 (21:11 +0100)]
f2fs: Use a folio in find_in_level()
Get a folio instead of a page and use it throughout. Removes a
call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:03 +0000 (21:11 +0100)]
f2fs: Remove f2fs_get_sum_page()
All callers have now been converted to call f2fs_get_sum_folio()
instead.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:02 +0000 (21:11 +0100)]
f2fs: Use a folio in change_curseg()
Get a folio and use it. Saves a call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:01 +0000 (21:11 +0100)]
f2fs: Use a folio in check_index_in_prev_nodes()
Get a folio instead of a page and operate on it. Saves a call to
compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:11:00 +0000 (21:11 +0100)]
f2fs: Use folios in do_garbage_collect()
Get a folio instead of a page and operate on folios throughout.
Remove six calls to compound_head() and use folio_put_refs() to put
both references we hold at the same time, reducing the number of atomic
operations we do.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:59 +0000 (21:10 +0100)]
f2fs: Add f2fs_get_sum_folio()
Convert f2fs_get_sum_page() to f2fs_get_sum_folio() and add a
f2fs_get_sum_page() wrapper.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:58 +0000 (21:10 +0100)]
f2fs: Pass an address to scan_nat_page()
Remove a conversion from folio to page by passing in the address of the
first byte rather than the struct page containing it.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:57 +0000 (21:10 +0100)]
f2fs: Convert f2fs_get_meta_page_retry() to f2fs_get_meta_folio_retry()
Also convert get_current_nat_page() to get_current_nat_folio().
Removes three hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:56 +0000 (21:10 +0100)]
f2fs: Remove f2fs_get_meta_page()
All callers have now been converted to f2fs_get_meta_folio() so
we can remove this wrapper.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>