Skip to content

Commit a6d9946

Browse files
committed
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 <[email protected]> Cc: [email protected]
1 parent 576d18e commit a6d9946

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/ext4/ioctl.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,8 @@ static int ext4_shutdown(struct super_block *sb, unsigned long arg)
498498
break;
499499
case EXT4_GOING_FLAGS_NOLOGFLUSH:
500500
set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
501-
if (sbi->s_journal && !is_journal_aborted(sbi->s_journal)) {
502-
msleep(100);
501+
if (sbi->s_journal && !is_journal_aborted(sbi->s_journal))
503502
jbd2_journal_abort(sbi->s_journal, 0);
504-
}
505503
break;
506504
default:
507505
return -EINVAL;

0 commit comments

Comments
 (0)