Skip to content

ext4: fix race between writepages and enabling EXT4_EXTENTS_FL

Eric Biggers linux-ext4 3 versions – Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesApplied
  2. v21 patch 2 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v3 from the cover letter

Do the renaming in a separate patch.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2ext4: rename s_journal_flag_rwsem to s_writepages_rwsemfs/ext4/ext4.h fs/ext4/inode.c fs/ext4/super.c+11 -112 replies
2/2ext4: fix race between writepages and enabling EXT4_EXTENTS_FLfs/ext4/ext4.h fs/ext4/migrate.c+23 -92 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJan Kara
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] ext4: fix race between writepages and enabling EXT4_EXTENTS_FL

This series fixes a race between writepages and enabling EXT4_EXTENTS_FL that could cause a WARN_ON() in ext4_add_complete_io() to be hit. Patch 1 is a trivial renaming in preparation for patch 2 which is the actual fix. See patch 2 for the full details.

Changed in v3:
Do the renaming in a separate patch.

Changed in v2:
Instead of making ext4_writepages() read EXT4_EXTENTS_FL only once, make it so that EXT4_EXTENTS_FL can't be changed while ext4_writepages() is running.

Eric Biggers (2):
ext4: rename s_journal_flag_rwsem to s_writepages_rwsem
ext4: fix race between writepages and enabling EXT4_EXTENTS_FL

 fs/ext4/ext4.h    |  7 +++++--
 fs/ext4/inode.c   | 14 +++++++-------
 fs/ext4/migrate.c | 27 +++++++++++++++++++--------
 fs/ext4/super.c   |  6 +++---
 4 files changed, 34 insertions(+), 20 deletions(-)

base-commit: c96dceeabf765d0b1b1f29c3bf50a5c01315b820

Signature · 1 line
2.25.0