[GIT PULL] f2fs update for 7.1-rc1

From: Jaegeuk Kim

Date: Tue Apr 21 2026 - 17:50:17 EST


Hi Linus,

Could you please consider this pull requeset?

The following changes since commit e3c33bc767b5512dbfec643a02abf58ce608f3b2:

Merge tag 'mm-hotfixes-stable-2026-03-23-17-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm (2026-03-24 09:12:45 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git tags/f2fs-for-7.1-rc1

for you to fetch changes up to cb8ff3ead9a3fc43727980be58c7099506f65261:

f2fs: add page-order information for large folio reads in iostat (2026-04-18 22:44:42 +0000)

----------------------------------------------------------------
f2fs-for-7.1-rc1

In this round, the changes primarily focus on resolving race conditions,
memory safety issues (UAF), and improving the robustness of garbage
collection (GC), and folio management.

Enhancement:
- add page-order information for large folio reads in iostat
- add defrag_blocks sysfs node

Bug fix:
- fix uninitialized kobject put in f2fs_init_sysfs()
- disallow setting an extension to both cold and hot
- fix node_cnt race between extent node destroy and writeback
- fix to preserve previous reserve_{blocks,node} value when remount
- fix to freeze GC and discard threads quickly
- fix false alarm of lockdep on cp_global_sem lock
- fix data loss caused by incorrect use of nat_entry flag
- fix to skip empty sections in f2fs_get_victim
- fix inline data not being written to disk in writeback path
- fix fsck inconsistency caused by FGGC of node block
- fix fsck inconsistency caused by incorrect nat_entry flag usage
- call f2fs_handle_critical_error() to set cp_error flag
- fix fiemap boundary handling when read extent cache is incomplete
- fix use-after-free of sbi in f2fs_compress_write_end_io()
- fix UAF caused by decrementing sbi->nr_pages[] in f2fs_write_end_io()
- fix incorrect file address mapping when inline inode is unwritten
- fix incomplete search range in f2fs_get_victim when f2fs_need_rand_seg is enabled
- fix to avoid memory leak in f2fs_rename()

----------------------------------------------------------------
Cen Zhang (1):
f2fs: add READ_ONCE() for i_blocks in f2fs_update_inode()

Chao Yu (6):
f2fs: fix to avoid memory leak in f2fs_rename()
f2fs: call f2fs_handle_critical_error() to set cp_error flag
f2fs: use more generic f2fs_stop_checkpoint()
f2fs: fix to do sanity check on dcc->discard_cmd_cnt conditionally
f2fs: fix false alarm of lockdep on cp_global_sem lock
f2fs: fix to avoid uninit-value access in f2fs_sanity_check_node_footer

Daeho Jeong (2):
f2fs: fix to skip empty sections in f2fs_get_victim
f2fs: fix to freeze GC and discard threads quickly

Daniel Lee (1):
f2fs: add page-order information for large folio reads in iostat

Eric Biggers (1):
f2fs: remove unreachable code in f2fs_encrypt_one_page()

George Saad (1):
f2fs: fix use-after-free of sbi in f2fs_compress_write_end_io()

Guangshuo Li (1):
f2fs: fix uninitialized kobject put in f2fs_init_sysfs()

Jaegeuk Kim (2):
f2fs: allow empty mount string for Opt_usr|grp|projjquota
f2fs: do not support mmap write for large folio

Jianan Huang (1):
f2fs: avoid reading already updated pages during GC

Yongpeng Yang (16):
f2fs: fix incorrect file address mapping when inline inode is unwritten
f2fs: fix UAF caused by decrementing sbi->nr_pages[] in f2fs_write_end_io()
f2fs: drop unused sbi parameter from f2fs_in_warm_node_list()
f2fs: fix incorrect multidevice info in trace_f2fs_map_blocks()
f2fs: fix fiemap boundary handling when read extent cache is incomplete
f2fs: drop unused ri parameter from truncate_partial_nodes()
f2fs: refactor f2fs_move_node_folio function
f2fs: refactor node footer flag setting related code
f2fs: fix fsck inconsistency caused by incorrect nat_entry flag usage
f2fs: fix fsck inconsistency caused by FGGC of node block
f2fs: fix inline data not being written to disk in writeback path
f2fs: fix data loss caused by incorrect use of nat_entry flag
f2fs: invalidate block device page cache on umount
f2fs: fix node_cnt race between extent node destroy and writeback
f2fs: disallow setting an extension to both cold and hot
f2fs: protect extension_list reading with sb_lock in f2fs_sbi_show()

Zhiguo Niu (1):
f2fs: fix to preserve previous reserve_{blocks,node} value when remount

liujinbao1 (2):
f2fs:Fix incomplete search range in f2fs_get_victim when f2fs_need_rand_seg is enabled
f2fs: Add defrag_blocks sysfs node

Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++
fs/f2fs/checkpoint.c | 9 ---
fs/f2fs/compress.c | 14 +++-
fs/f2fs/data.c | 53 +++++++++------
fs/f2fs/debug.c | 1 +
fs/f2fs/extent_cache.c | 17 +++--
fs/f2fs/f2fs.h | 41 ++++++++++--
fs/f2fs/file.c | 15 ++++-
fs/f2fs/gc.c | 23 ++++++-
fs/f2fs/inline.c | 22 +++++--
fs/f2fs/inode.c | 2 +-
fs/f2fs/iostat.c | 38 ++++++++++-
fs/f2fs/iostat.h | 4 ++
fs/f2fs/namei.c | 16 +++++
fs/f2fs/node.c | 112 +++++++++++++++++---------------
fs/f2fs/node.h | 23 ++++---
fs/f2fs/segment.c | 20 ++++--
fs/f2fs/super.c | 70 +++++++++++++++-----
fs/f2fs/sysfs.c | 27 ++++++--
include/linux/f2fs_fs.h | 3 +
include/trace/events/f2fs.h | 21 ++++--
21 files changed, 386 insertions(+), 151 deletions(-)