linux-2.6-microblaze.git
7 weeks agof2fs: Use a folio in f2fs_inline_data_fiemap()
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>
7 weeks agof2fs: Use a folio in f2fs_read_inline_dir()
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>
7 weeks agof2fs: Use a folio in f2fs_empty_inline_dir()
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>
7 weeks agof2fs: Use a folio in f2fs_find_in_inline_dir()
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>
7 weeks agof2fs: Use a folio in f2fs_recover_inline_data()
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>
7 weeks agof2fs: Use a folio in f2fs_read_inline_data()
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>
7 weeks agof2fs: Use a folio in f2fs_write_inline_data()
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>
7 weeks agof2fs: Remove f2fs_get_xnode_page()
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>
7 weeks agof2fs: Use a folio in read_xattr_block()
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>
7 weeks agof2fs: Convert f2fs_convert_inline_page() to f2fs_convert_inline_folio()
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>
7 weeks agof2fs: Pass folios to set_new_dnode()
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>
7 weeks agof2fs: Use a folio in f2fs_truncate_xattr_node()
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>
7 weeks agof2fs: Use a folio in f2fs_do_truncate_blocks()
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>
7 weeks agof2fs: Pass a folio to f2fs_move_rehashed_dirents()
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>
7 weeks agof2fs: Pass a folio to f2fs_move_inline_dirents()
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>
7 weeks agof2fs: Use a folio in f2fs_add_inline_entry()
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>
7 weeks agof2fs: Use a folio in f2fs_try_convert_inline_dir()
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>
7 weeks agof2fs: Pass a folio to make_empty_dir()
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>
7 weeks agof2fs: Use a folio in f2fs_init_inode_metadata()
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>
7 weeks agof2fs: Use a folio in __find_data_block()
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>
7 weeks agof2fs: Use a folio in prepare_write_begin
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>
7 weeks agof2fs: Remove f2fs_get_node_page()
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>
7 weeks agof2fs: Use a folio in check_index_in_prev_nodes()
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>
7 weeks agof2fs: Use a folio in is_alive()
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>
7 weeks agof2fs: Convert __write_node_page() to __write_node_folio()
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>
7 weeks agof2fs: Convert f2fs_move_node_page() to f2fs_move_node_folio()
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>
7 weeks agof2fs: Use a folio in gc_node_segment()
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>
7 weeks agof2fs: Pass a folio to f2fs_ra_node_pages()
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>
7 weeks agof2fs: Use folios in truncate_partial_nodes()
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>
7 weeks agof2fs: Use a folio in truncate_nodes()
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>
7 weeks agof2fs: Use a folio in truncate_node()
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>
7 weeks agof2fs: Use folios in f2fs_get_dnode_of_data()
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>
7 weeks agof2fs: Add f2fs_get_node_folio()
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>
7 weeks agof2fs: Use a folio in f2fs_recover_xattr_data()
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>
7 weeks agof2fs: Use a folio in write_all_xattrs()
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>
7 weeks agof2fs: Add f2fs_get_xnode_folio()
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>
7 weeks agof2fs: Remove f2fs_grab_cache_page()
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>
7 weeks agof2fs: Use a folio in f2fs_recover_inode_page()
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>
7 weeks agof2fs: Pass a folio to f2fs_inode_chksum_verify()
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>
7 weeks agof2fs: Convert read_node_page() to read_node_folio()
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>
7 weeks agof2fs: Use a folio in f2fs_ra_node_page()
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>
7 weeks agof2fs: Add f2fs_new_node_folio()
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>
7 weeks agof2fs: Use a folio in f2fs_move_inline_dirents()
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>
7 weeks agof2fs: Use a folio in f2fs_convert_inline_inode()
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>
7 weeks agof2fs: Use a folio in move_data_block()
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>
7 weeks agof2fs: Use a folio in ra_data_block()
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>
7 weeks agof2fs: Use a folio in f2fs_xattr_fiemap()
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>
7 weeks agof2fs: Remove f2fs_get_new_data_page()
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>
7 weeks agof2fs: Use a folio in make_empty_dir()
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>
7 weeks agof2fs: Use a folio in f2fs_add_regular_entry()
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>
7 weeks agof2fs: Use a folio in fill_zero()
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>
7 weeks agof2fs: Remove f2fs_get_lock_data_page()
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>
7 weeks agof2fs: Use a folio in f2fs_defragment_range()
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>
7 weeks agof2fs: Use a folio in __clone_blkaddrs()
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>
7 weeks agohighmem: Add memcpy_folio()
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>
7 weeks agof2fs: Add f2fs_get_new_data_folio()
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>
7 weeks agof2fs: Use a folio in f2fs_migrate_blocks()
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>
7 weeks agof2fs: Use a folio in f2fs_get_new_data_page()
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>
7 weeks agof2fs: Remove f2fs_find_data_page()
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>
7 weeks agof2fs: Use a folio in f2fs_readdir()
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>
7 weeks agof2fs: Use a folio in f2fs_delete_entry()
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>
7 weeks agof2fs: Use a folio in find_in_level()
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>
7 weeks agof2fs: Remove f2fs_get_sum_page()
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>
7 weeks agof2fs: Use a folio in change_curseg()
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>
7 weeks agof2fs: Use a folio in check_index_in_prev_nodes()
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>
7 weeks agof2fs: Use folios in do_garbage_collect()
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>
7 weeks agof2fs: Add f2fs_get_sum_folio()
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>
7 weeks agof2fs: Pass an address to scan_nat_page()
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>
7 weeks agof2fs: Convert f2fs_get_meta_page_retry() to f2fs_get_meta_folio_retry()
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>
7 weeks agof2fs: Remove f2fs_get_meta_page()
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>
7 weeks agof2fs: Use a folio in read_normal_summaries()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:55 +0000 (21:10 +0100)]
f2fs: Use a folio in read_normal_summaries()

Get a folio instead of a page.  Saves 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>
7 weeks agof2fs: Use a folio in read_compacted_summaries()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:54 +0000 (21:10 +0100)]
f2fs: Use a folio in read_compacted_summaries()

Get a folio instead of a page.  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>
7 weeks agof2fs: Use a folio in __get_nat_bitmaps()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:53 +0000 (21:10 +0100)]
f2fs: Use a folio in __get_nat_bitmaps()

Get a folio instead of a page.  Saves 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>
7 weeks agof2fs: Use a folio in f2fs_get_node_info()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:52 +0000 (21:10 +0100)]
f2fs: Use a folio in f2fs_get_node_info()

Get a folio instead of a page.  Saves 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>
7 weeks agof2fs: Use a folio in f2fs_get_valid_checkpoint()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:51 +0000 (21:10 +0100)]
f2fs: Use a folio in f2fs_get_valid_checkpoint()

Convert validate_checkpoint() to return a folio and use it throughout
f2fs_get_valid_checkpoint().  Saves 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>
7 weeks agof2fs: Use a folio in validate_checkpoint()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:50 +0000 (21:10 +0100)]
f2fs: Use a folio in validate_checkpoint()

Convert get_checkpoint_version() to take a folio and use it throughout
validate_checkpoint().  Saves 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>
7 weeks agof2fs: Use a folio in f2fs_recover_orphan_inodes()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:49 +0000 (21:10 +0100)]
f2fs: Use a folio in f2fs_recover_orphan_inodes()

Get a folio instead of a page and use it throughout.  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>
7 weeks agof2fs: Use a folio in build_sit_entries()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:48 +0000 (21:10 +0100)]
f2fs: Use a folio in build_sit_entries()

Convert get_current_sit_page() to get_current_sit_folio() and then
use the folio in build_sit_entries().  Saves 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>
7 weeks agof2fs: Add f2fs_get_meta_folio()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:47 +0000 (21:10 +0100)]
f2fs: Add f2fs_get_meta_folio()

Convert f2fs_get_meta_page() to f2fs_get_meta_folio() and add
f2fs_get_meta_page() as a 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>
7 weeks agof2fs: Remove f2fs_grab_meta_page()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:46 +0000 (21:10 +0100)]
f2fs: Remove f2fs_grab_meta_page()

All callers have now been converted to f2fs_grab_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>
7 weeks agof2fs: Use a folio in write_compacted_summaries()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:45 +0000 (21:10 +0100)]
f2fs: Use a folio in write_compacted_summaries()

Grab a folio instead of a page.  Saves 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>
7 weeks agof2fs: Use a folio in write_current_sum_page()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:44 +0000 (21:10 +0100)]
f2fs: Use a folio in write_current_sum_page()

Grab a folio instead of a page.  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>
7 weeks agof2fs: Use a folio in f2fs_update_meta_page()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:43 +0000 (21:10 +0100)]
f2fs: Use a folio in f2fs_update_meta_page()

Grab a folio instead of a page.  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>
7 weeks agof2fs: Convert get_next_sit_page() to get_next_sit_folio()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:42 +0000 (21:10 +0100)]
f2fs: Convert get_next_sit_page() to get_next_sit_folio()

Grab a folio instead of a page.  Also convert seg_info_to_sit_page() to
seg_info_to_sit_folio() and use a folio in f2fs_flush_sit_entries().
Saves a couple of 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>
7 weeks agof2fs: Use a folio in get_next_nat_page()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:41 +0000 (21:10 +0100)]
f2fs: Use a folio in get_next_nat_page()

Call f2fs_grab_meta_folio() instead of f2fs_grab_meta_page().
Saves 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>
7 weeks agof2fs: Use a folio in write_orphan_inodes()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:40 +0000 (21:10 +0100)]
f2fs: Use a folio in write_orphan_inodes()

Call f2fs_grab_meta_folio() instead of f2fs_grab_meta_page().
Removes 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>
7 weeks agof2fs: Use a folio in f2fs_ra_meta_pages_cond()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:39 +0000 (21:10 +0100)]
f2fs: Use a folio in f2fs_ra_meta_pages_cond()

Remove a call to find_get_page().  Saves two hidden calls to
compound_head().  Change f2fs_folio_put() to check for IS_ERR_OR_NULL
to handle the case where we got an error pointer back from
filemap_get_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>
7 weeks agof2fs: Use a folio in f2fs_ra_meta_pages()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:38 +0000 (21:10 +0100)]
f2fs: Use a folio in f2fs_ra_meta_pages()

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>
7 weeks agof2fs: Pass a folio to next_blkaddr_of_node()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:37 +0000 (21:10 +0100)]
f2fs: Pass a folio to next_blkaddr_of_node()

Pass the folio into sanity_check_node_footer() so that we can pass
it further into next_blkaddr_of_node().  Removes a lot of conversions
from folio->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>
7 weeks agof2fs: Convert f2fs_get_tmp_page() to f2fs_get_tmp_folio()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:36 +0000 (21:10 +0100)]
f2fs: Convert f2fs_get_tmp_page() to f2fs_get_tmp_folio()

Convert all the callers to receive a folio.  Removes a lot of
hidden calls to compound_head() in f2fs_put_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>
7 weeks agof2fs: Convert __get_meta_page() to __get_meta_folio()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:35 +0000 (21:10 +0100)]
f2fs: Convert __get_meta_page() to __get_meta_folio()

Push the conversion to a page into the callers.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
7 weeks agof2fs: Pass a folio to f2fs_submit_merged_ipu_write()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:34 +0000 (21:10 +0100)]
f2fs: Pass a folio to f2fs_submit_merged_ipu_write()

The only caller which passes a page 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>
7 weeks agof2fs: Use f2fs_folio_wait_writeback()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:33 +0000 (21:10 +0100)]
f2fs: Use f2fs_folio_wait_writeback()

There were some missing conversions from f2fs_wait_on_page_writeback()
to f2fs_folio_wait_writeback().  Saves a call to compound_head() at each
callsite.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
7 weeks agof2fs: Convert __f2fs_write_meta_page() to __f2fs_write_meta_folio()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:32 +0000 (21:10 +0100)]
f2fs: Convert __f2fs_write_meta_page() to __f2fs_write_meta_folio()

All callers now have a folio so pass it in.  Saves 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>
7 weeks agof2fs: Use a folio in commit_checkpoint()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:31 +0000 (21:10 +0100)]
f2fs: Use a folio in commit_checkpoint()

Save four calls to compound_head().  Also remove the call
to f2fs_wait_on_page_writeback() as this was already done by
f2fs_grab_meta_folio() and writeback can't have restarted in the
meantime since we hold the folio locked.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
7 weeks agof2fs: Add f2fs_grab_meta_folio()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:30 +0000 (21:10 +0100)]
f2fs: Add f2fs_grab_meta_folio()

Turn f2fs_grab_meta_page() into a wrapper around f2fs_grab_meta_folio().
Saves 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>
7 weeks agof2fs: Use a folio in f2fs_quota_read()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:29 +0000 (21:10 +0100)]
f2fs: Use a folio in f2fs_quota_read()

Support arbitrary size folios and remove a few hidden calls to
compound_head().  Also remove an unnecessary test of the uptodaate flag;
if mapping_read_folio_gfp() cannot bring the folio uptodate, it will
return an error.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
7 weeks agof2fs: Use a folio in move_data_block()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:28 +0000 (21:10 +0100)]
f2fs: Use a folio in move_data_block()

Fetch a folio from the pagecache instead of a page and operate on it
throughout.  Removes eight calls to compound_head() and an access to
page->mapping.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
7 weeks agof2fs: Remove access to page->mapping in f2fs_is_cp_guaranteed()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:27 +0000 (21:10 +0100)]
f2fs: Remove access to page->mapping in f2fs_is_cp_guaranteed()

page->mapping will be removed soon, so call page_folio() on the
page that was passed 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>
7 weeks agof2fs: Use a folio in add_ipu_page()
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:10:26 +0000 (21:10 +0100)]
f2fs: Use a folio in add_ipu_page()

Convert the incoming page to a folio at the start, then use the
folio later in the function.  Moves a call to page_folio() earlier,
and removes an access to page->mapping.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>