summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2018-02-19 07:16:28 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-24 10:36:30 +0300
commit09439481998aefbe1bd6ae067079e738ba4a7a3f (patch)
tree5ede83d3150eaf701ab68638ebd890f2d3b1f0f2 /fs/ext4
parent7ebcea25968219b4ed9b27e5708e2b96c1718d86 (diff)
downloadlinux-09439481998aefbe1bd6ae067079e738ba4a7a3f.tar.xz
ext4: eliminate sleep from shutdown ioctl
commit a6d9946bb925293fda9f5ed6d33d8580b001f006 upstream. 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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/ioctl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index d97f40396765..7f889b1e4db0 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;