mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-10 10:39:26 +00:00
ext4: eliminate sleep from shutdown ioctl
commit a6d9946bb9
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>
This commit is contained in:
parent
7ebcea2596
commit
0943948199
1 changed files with 1 additions and 3 deletions
|
@ -498,10 +498,8 @@ static int ext4_shutdown(struct super_block *sb, unsigned long arg)
|
||||||
break;
|
break;
|
||||||
case EXT4_GOING_FLAGS_NOLOGFLUSH:
|
case EXT4_GOING_FLAGS_NOLOGFLUSH:
|
||||||
set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
|
set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
|
||||||
if (sbi->s_journal && !is_journal_aborted(sbi->s_journal)) {
|
if (sbi->s_journal && !is_journal_aborted(sbi->s_journal))
|
||||||
msleep(100);
|
|
||||||
jbd2_journal_abort(sbi->s_journal, 0);
|
jbd2_journal_abort(sbi->s_journal, 0);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in a new issue