All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>
Subject: [PATCH v3 0/2] ext4: fix race between writepages and enabling EXT4_EXTENTS_FL
Date: Wed, 19 Feb 2020 10:30:45 -0800	[thread overview]
Message-ID: <20200219183047.47417-1-ebiggers@kernel.org> (raw)

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


             reply	other threads:[~2020-02-19 18:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 18:30 Eric Biggers [this message]
2020-02-19 18:30 ` [PATCH v3 1/2] ext4: rename s_journal_flag_rwsem to s_writepages_rwsem Eric Biggers
2020-02-20  9:14   ` Jan Kara
2020-02-21 18:53     ` Theodore Y. Ts'o
2020-02-19 18:30 ` [PATCH v3 2/2] ext4: fix race between writepages and enabling EXT4_EXTENTS_FL Eric Biggers
2020-02-20  9:15   ` Jan Kara
2020-02-21 18:53     ` Theodore Y. Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200219183047.47417-1-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.