]>
www.infradead.org Git - users/jedix/linux-maple.git/log
Chao Yu [Mon, 14 Apr 2025 10:52:37 +0000 (18:52 +0800)]
f2fs: fix to detect gcing page in f2fs_is_cp_guaranteed()
Jan Prusakowski reported a f2fs bug as below:
f2fs/007 will hang kernel during testing w/ below configs:
kernel 6.12.18 (from pixel-kernel/android16-6.12)
export MKFS_OPTIONS="-O encrypt -O extra_attr -O project_quota -O quota"
export F2FS_MOUNT_OPTIONS="test_dummy_encryption,discard,fsync_mode=nobarrier,reserve_root=32768,checkpoint_merge,atgc"
cat /proc/<umount_proc_id>/stack
f2fs_wait_on_all_pages+0xa3/0x130
do_checkpoint+0x40c/0x5d0
f2fs_write_checkpoint+0x258/0x550
kill_f2fs_super+0x14f/0x190
deactivate_locked_super+0x30/0xb0
cleanup_mnt+0xba/0x150
task_work_run+0x59/0xa0
syscall_exit_to_user_mode+0x12d/0x130
do_syscall_64+0x57/0x110
entry_SYSCALL_64_after_hwframe+0x76/0x7e
cat /sys/kernel/debug/f2fs/status
- IO_W (CP: -256, Data: 256, Flush: ( 0 0 1), Discard: ( 0 0)) cmd: 0 undiscard: 0
CP IOs reference count becomes negative.
The root cause is:
After
4961acdd65c9 ("f2fs: fix to tag gcing flag on page during block
migration"), we will tag page w/ gcing flag for raw page of cluster
during its migration.
However, if the inode is both encrypted and compressed, during
ioc_decompress(), it will tag page w/ gcing flag, and it increase
F2FS_WB_DATA reference count:
- f2fs_write_multi_page
- f2fs_write_raw_page
- f2fs_write_single_page
- do_write_page
- f2fs_submit_page_write
- WB_DATA_TYPE(bio_page, fio->compressed_page)
: bio_page is encrypted, so mapping is NULL, and fio->compressed_page
is NULL, it returns F2FS_WB_DATA
- inc_page_count(.., F2FS_WB_DATA)
Then, during end_io(), it decrease F2FS_WB_CP_DATA reference count:
- f2fs_write_end_io
- f2fs_compress_write_end_io
- fscrypt_pagecache_folio
: get raw page from encrypted page
- WB_DATA_TYPE(&folio->page, false)
: raw page has gcing flag, it returns F2FS_WB_CP_DATA
- dec_page_count(.., F2FS_WB_CP_DATA)
In order to fix this issue, we need to detect gcing flag in raw page
in f2fs_is_cp_guaranteed().
Fixes: 4961acdd65c9 ("f2fs: fix to tag gcing flag on page during block migration")
Reported-by: Jan Prusakowski <jprusakowski@google.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Chao Yu [Mon, 14 Apr 2025 10:52:36 +0000 (18:52 +0800)]
f2fs: clean up w/ fscrypt_is_bounce_page()
Just cleanup, no logic changes.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Matthew Wilcox (Oracle) [Mon, 31 Mar 2025 20:12:53 +0000 (21:12 +0100)]
f2fs: Convert clear_node_page_dirty() to clear_node_folio_dirty()
Both callers have a folio so pass it in, removing 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:52 +0000 (21:12 +0100)]
f2fs: Use a folio in flush_inline_data()
Get a folio from the page cache and use it throughout. 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:51 +0000 (21:12 +0100)]
f2fs: Remove f2fs_new_node_page()
All callers now use f2fs_new_node_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:50 +0000 (21:12 +0100)]
f2fs: Convert fsync_node_entry->page to folio
Convert all callers to set/get a folio instead of a page. 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:49 +0000 (21:12 +0100)]
f2fs: Pass a folio to get_dnode_addr()
All callers except __get_inode_rdev() and __set_inode_rdev() now have a
folio, but the only callers of those two functions do have a folio, so
pass the folio to them and then into get_dnode_addr().
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:48 +0000 (21:12 +0100)]
f2fs: Convert dnode_of_data->node_page to node_folio
All assignments to this struct member are conversions from a folio
so convert it to be a folio and convert all users. At the same time,
convert data_blkaddr() to take a folio as all callers now have a folio.
Remove 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:47 +0000 (21:12 +0100)]
f2fs: Pass a folio to set_nid()
All callers 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:12:46 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_update_inode()
All callers now have a folio, so pass it in. 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:45 +0000 (21:12 +0100)]
f2fs: Return a folio from f2fs_init_inode_metadata()
Convert all three callers to handle a folio return. 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:44 +0000 (21:12 +0100)]
f2fs: Pass a folio to f2fs_init_read_extent_tree()
The only caller alredy has a folio so pass it in. 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:43 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_wait_on_block_writeback()
Fetch a folio from the pagecache and use it. 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:42 +0000 (21:12 +0100)]
f2fs: Use a folio in redirty_blocks()
Support large folios & simplify the loops in redirty_blocks().
Use the folio APIs and 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:41 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_encrypt_one_page()
Fetch a folio from the page cache instead of a page. 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:40 +0000 (21:12 +0100)]
f2fs: Convert f2fs_load_compressed_page() to f2fs_load_compressed_folio()
The only caller already has a folio, so pass it in. Copy the entire
size of the folio to support large block sizes. 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:39 +0000 (21:12 +0100)]
f2fs: Use a folio in prepare_compress_overwrite()
Add f2fs_filemap_get_folio() as a wrapper around __filemap_get_folio()
which can inject an error. 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:12:38 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_cache_compressed_page()
Look up a folio instead of a page, and if that fails, allocate a folio.
Removes five calls to compound_head(), one of the last few references to
add_to_page_cache_lru() and honours the cpuset_do_page_mem_spread()
setting.
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:37 +0000 (21:12 +0100)]
f2fs: Use a folio in f2fs_truncate_meta_inode_pages()
Fetch a folio from the pagecache instead of a page. 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:36 +0000 (21:12 +0100)]
f2fs: Use a folio in need_inode_page_update()
Fetch a folio from the pagecache instead of a page. 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: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>