diff options
Diffstat (limited to 'fs/jbd/recovery.c')
-rw-r--r-- | fs/jbd/recovery.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c index 5b43e96788e6..008bf062fd26 100644 --- a/fs/jbd/recovery.c +++ b/fs/jbd/recovery.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #include <linux/jbd.h> | 21 | #include <linux/jbd.h> |
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/blkdev.h> | ||
23 | #endif | 24 | #endif |
24 | 25 | ||
25 | /* | 26 | /* |
@@ -263,6 +264,9 @@ int journal_recover(journal_t *journal) | |||
263 | err2 = sync_blockdev(journal->j_fs_dev); | 264 | err2 = sync_blockdev(journal->j_fs_dev); |
264 | if (!err) | 265 | if (!err) |
265 | err = err2; | 266 | err = err2; |
267 | /* Flush disk caches to get replayed data on the permanent storage */ | ||
268 | if (journal->j_flags & JFS_BARRIER) | ||
269 | blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); | ||
266 | 270 | ||
267 | return err; | 271 | return err; |
268 | } | 272 | } |