Skip to content

Commit

Permalink
jbd2: check return value of blkdev_issue_flush()
Browse files Browse the repository at this point in the history
blkdev_issue_flush() can fail; make sure the error gets properly
propagated.

This is a port of the equivalent jbd patch from commit 349ecd6.

Signed-off-by: "Theodore Ts'o" <[email protected]>
  • Loading branch information
tytso committed Aug 17, 2012
1 parent 67a5da5 commit 316e4cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/jbd2/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,11 @@ int jbd2_journal_recover(journal_t *journal)
if (!err)
err = err2;
/* Make sure all replayed data is on permanent storage */
if (journal->j_flags & JBD2_BARRIER)
blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
if (journal->j_flags & JBD2_BARRIER) {
err2 = blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
if (!err)
err = err2;
}
return err;
}

Expand Down

0 comments on commit 316e4cf

Please sign in to comment.