jbd2: check return value of blkdev_issue_flush()
blkdev_issue_flush() can fail; make sure the error gets properly
propagated.
This is a port of the equivalent jbd patch from commit 349ecd6a3c.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
+5
-2
@@ -289,8 +289,11 @@ int jbd2_journal_recover(journal_t *journal)
|
|||||||
if (!err)
|
if (!err)
|
||||||
err = err2;
|
err = err2;
|
||||||
/* Make sure all replayed data is on permanent storage */
|
/* Make sure all replayed data is on permanent storage */
|
||||||
if (journal->j_flags & JBD2_BARRIER)
|
if (journal->j_flags & JBD2_BARRIER) {
|
||||||
blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
|
err2 = blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
|
||||||
|
if (!err)
|
||||||
|
err = err2;
|
||||||
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user