Skip to content

Commit

Permalink
jbd: 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.

Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
jankara committed Jul 9, 2012
1 parent 17dc59b commit 349ecd6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/jbd/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,11 @@ int journal_recover(journal_t *journal)
if (!err)
err = err2;
/* Flush disk caches to get replayed data on the permanent storage */
if (journal->j_flags & JFS_BARRIER)
blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
if (journal->j_flags & JFS_BARRIER) {
err2 = blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
if (!err)
err = err2;
}

return err;
}
Expand Down

0 comments on commit 349ecd6

Please sign in to comment.