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 -- 2.25.0