diff options
author | Theodore Ts'o <tytso@mit.edu> | 2018-02-18 23:16:28 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-02-18 23:16:28 -0500 |
commit | a6d9946bb925293fda9f5ed6d33d8580b001f006 (patch) | |
tree | 2fb88ed38dfc9b4e7599cdbdd9832b581bf24846 /fs/ext4 | |
parent | 576d18ed60f5465110087c5e0eb1010de13e374d (diff) | |
download | linux-a6d9946bb925293fda9f5ed6d33d8580b001f006.tar.gz linux-a6d9946bb925293fda9f5ed6d33d8580b001f006.tar.bz2 linux-a6d9946bb925293fda9f5ed6d33d8580b001f006.zip |
ext4: eliminate sleep from shutdown ioctl
The msleep() when processing EXT4_GOING_FLAGS_NOLOGFLUSH was a hack to
avoid some races (that are now fixed), but in fact it introduced its
own race.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/ioctl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 4d1b1575f8ac..16d3d1325f5b 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -498,10 +498,8 @@ static int ext4_shutdown(struct super_block *sb, unsigned long arg) break; case EXT4_GOING_FLAGS_NOLOGFLUSH: set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags); - if (sbi->s_journal && !is_journal_aborted(sbi->s_journal)) { - msleep(100); + if (sbi->s_journal && !is_journal_aborted(sbi->s_journal)) jbd2_journal_abort(sbi->s_journal, 0); - } break; default: return -EINVAL; |