diff options
-rw-r--r-- | fs/jbd2/commit.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 6e28000a4b21..78c299218681 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
@@ -760,8 +760,13 @@ wait_for_iobuf: | |||
760 | required. */ | 760 | required. */ |
761 | JBUFFER_TRACE(jh, "file as BJ_Forget"); | 761 | JBUFFER_TRACE(jh, "file as BJ_Forget"); |
762 | jbd2_journal_file_buffer(jh, commit_transaction, BJ_Forget); | 762 | jbd2_journal_file_buffer(jh, commit_transaction, BJ_Forget); |
763 | /* Wake up any transactions which were waiting for this | 763 | /* |
764 | IO to complete */ | 764 | * Wake up any transactions which were waiting for this IO to |
765 | * complete. The barrier must be here so that changes by | ||
766 | * jbd2_journal_file_buffer() take effect before wake_up_bit() | ||
767 | * does the waitqueue check. | ||
768 | */ | ||
769 | smp_mb(); | ||
765 | wake_up_bit(&bh->b_state, BH_Unshadow); | 770 | wake_up_bit(&bh->b_state, BH_Unshadow); |
766 | JBUFFER_TRACE(jh, "brelse shadowed buffer"); | 771 | JBUFFER_TRACE(jh, "brelse shadowed buffer"); |
767 | __brelse(bh); | 772 | __brelse(bh); |