]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ext4: factor out journalled block zeroing range
authorZhang Yi <yi.zhang@huawei.com>
Fri, 27 Mar 2026 10:29:29 +0000 (18:29 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 10 Apr 2026 01:57:51 +0000 (21:57 -0400)
commit3b312a6f510ca217607ffacf5cbca2f08c402ec0
treecaac1c697dd3a7a812cec9e06b4d88e913ea0e2c
parentbd099a0565fce5c771e1d0bfcefec26fb5b1c1b7
ext4: factor out journalled block zeroing range

Refactor __ext4_block_zero_page_range() by separating the block zeroing
operations for ordered data mode and journal data mode into two distinct
functions:

  - ext4_block_do_zero_range(): handles non-journal data mode with
    ordered data support
  - ext4_block_journalled_zero_range(): handles journal data mode

Also extract a common helper, ext4_load_tail_bh(), to handle buffer head
and folio retrieval, along with the associated error handling. This
prepares for converting the partial block zero range to the iomap
infrastructure.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260327102939.1095257-4-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c