]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge tag 'ext4_for_linux-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Apr 2026 00:08:31 +0000 (17:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Apr 2026 00:08:31 +0000 (17:08 -0700)
Pull ext4 updates from Ted Ts'o:

 - Refactor code paths involved with partial block zero-out in
   prearation for converting ext4 to use iomap for buffered writes

 - Remove use of d_alloc() from ext4 in preparation for the deprecation
   of this interface

 - Replace some J_ASSERTS with a journal abort so we can avoid a kernel
   panic for a localized file system error

 - Simplify various code paths in mballoc, move_extent, and fast commit

 - Fix rare deadlock in jbd2_journal_cancel_revoke() that can be
   triggered by generic/013 when blocksize < pagesize

 - Fix memory leak when releasing an extended attribute when its value
   is stored in an ea_inode

 - Fix various potential kunit test bugs in fs/ext4/extents.c

 - Fix potential out-of-bounds access in check_xattr() with a corrupted
   file system

 - Make the jbd2_inode dirty range tracking safe for lockless reads

 - Avoid a WARN_ON when writeback files due to a corrupted file system;
   we already print an ext4 warning indicatign that data will be lost,
   so the WARN_ON is not necessary and doesn't add any new information

* tag 'ext4_for_linux-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (37 commits)
  jbd2: fix deadlock in jbd2_journal_cancel_revoke()
  ext4: fix missing brelse() in ext4_xattr_inode_dec_ref_all()
  ext4: fix possible null-ptr-deref in mbt_kunit_exit()
  ext4: fix possible null-ptr-deref in extents_kunit_exit()
  ext4: fix the error handling process in extents_kunit_init).
  ext4: call deactivate_super() in extents_kunit_exit()
  ext4: fix miss unlock 'sb->s_umount' in extents_kunit_init()
  ext4: fix bounds check in check_xattrs() to prevent out-of-bounds access
  ext4: zero post-EOF partial block before appending write
  ext4: move pagecache_isize_extended() out of active handle
  ext4: remove ctime/mtime update from ext4_alloc_file_blocks()
  ext4: unify SYNC mode checks in fallocate paths
  ext4: ensure zeroed partial blocks are persisted in SYNC mode
  ext4: move zero partial block range functions out of active handle
  ext4: pass allocate range as loff_t to ext4_alloc_file_blocks()
  ext4: remove handle parameters from zero partial block functions
  ext4: move ordered data handling out of ext4_block_do_zero_range()
  ext4: rename ext4_block_zero_page_range() to ext4_block_zero_range()
  ext4: factor out journalled block zeroing range
  ext4: rename and extend ext4_block_truncate_page()
  ...

13 files changed:
1  2 
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/fast_commit.c
fs/ext4/file.c
fs/ext4/inode.c
fs/ext4/mballoc-test.c
fs/ext4/mballoc.c
fs/ext4/move_extent.c
fs/ext4/namei.c
fs/ext4/super.c
fs/ext4/xattr.c
fs/jbd2/journal.c
fs/jbd2/transaction.c

diff --cc fs/ext4/ext4.h
Simple merge
Simple merge
Simple merge
diff --cc fs/ext4/file.c
Simple merge
diff --cc fs/ext4/inode.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/ext4/namei.c
Simple merge
diff --cc fs/ext4/super.c
Simple merge
diff --cc fs/ext4/xattr.c
Simple merge
Simple merge
index a90f9092706cceea56c1100f7d40ccba0d50adba,495f0012984459572c3dd30ec4f31bd4c8c91f73..4885903bbd10cae2c1dec5bc1a7490dce80b4b83
@@@ -2651,18 -2702,24 +2702,24 @@@ static int jbd2_journal_file_inode(hand
                return -EROFS;
        journal = transaction->t_journal;
  
 -      jbd2_debug(4, "Adding inode %lu, tid:%d\n", jinode->i_vfs_inode->i_ino,
 +      jbd2_debug(4, "Adding inode %llu, tid:%d\n", jinode->i_vfs_inode->i_ino,
                        transaction->t_tid);
  
+       start_page = (pgoff_t)(start_byte >> PAGE_SHIFT);
+       end_page = (pgoff_t)(end_byte >> PAGE_SHIFT) + 1;
        spin_lock(&journal->j_list_lock);
-       jinode->i_flags |= flags;
+       WRITE_ONCE(jinode->i_flags, jinode->i_flags | flags);
  
-       if (jinode->i_dirty_end) {
-               jinode->i_dirty_start = min(jinode->i_dirty_start, start_byte);
-               jinode->i_dirty_end = max(jinode->i_dirty_end, end_byte);
+       if (jinode->i_dirty_start_page != jinode->i_dirty_end_page) {
+               WRITE_ONCE(jinode->i_dirty_start_page,
+                          min(jinode->i_dirty_start_page, start_page));
+               WRITE_ONCE(jinode->i_dirty_end_page,
+                          max(jinode->i_dirty_end_page, end_page));
        } else {
-               jinode->i_dirty_start = start_byte;
-               jinode->i_dirty_end = end_byte;
+               /* Publish a new non-empty range by making end visible first. */
+               WRITE_ONCE(jinode->i_dirty_end_page, end_page);
+               WRITE_ONCE(jinode->i_dirty_start_page, start_page);
        }
  
        /* Is inode already attached where we need it? */